[PATCH] ms_schema: fix python2.6 incompatibility

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Thu Mar 15 20:23:16 UTC 2018


On 16/03/18 06:44, Bjoern Baumbach via samba-technical wrote:

>  
> -    entry = header + [x for x in entry if x[0].lower() not in {'dn', 'changetype', 'objectcategory'}]
> +    entry = header + [x for x in entry if x[0].lower() not in set(['dn', 'changetype', 'objectcategory'])]
>  

In this case with three members it would be more efficient and 
line-length-compliant to just use a list or tuple:

+    entry = header + [x for x in entry if x[0].lower() not in ('dn', 'changetype', 'objectcategory')]

but either way RB+ me.

Douglas



More information about the samba-technical mailing list