From 43b76b2ab31bbb45f75b79fd5f099e484724108f Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 5 Sep 2016 13:59:16 +0200 Subject: [PATCH] improve PEP8ness --- src/ldaptools/synchronize.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ldaptools/synchronize.py b/src/ldaptools/synchronize.py index 84f84aa..1286445 100644 --- a/src/ldaptools/synchronize.py +++ b/src/ldaptools/synchronize.py @@ -123,7 +123,8 @@ class Synchronize(object): case_insensitive_attribute = None def __init__(self, source, source_dn, target_conn, target_dn, attributes=None, all_filter=None, - pivot_attributes=None, logger=None, case_insensitive_attribute=None): + pivot_attributes=None, logger=None, case_insensitive_attribute=None, + objectclasses=None): self.source = source self.source_dn = source_dn self.target_conn = target_conn @@ -132,7 +133,8 @@ class Synchronize(object): self.all_filter = all_filter or self.all_filter self.pivot_attributes = pivot_attributes or self.pivot_attributes self.logger = logger or logging.getLogger(__name__) - self.case_insensitive_attribute = map(istr, case_insensitive_attribute or self.case_insensitive_attribute or []) + self.case_insensitive_attribute = map(istr, case_insensitive_attribute + or self.case_insensitive_attribute or []) self.errors = [] def massage_dn(self, old_dn): @@ -212,8 +214,9 @@ class Synchronize(object): for attribute in self.attributes: if attribute in to_dict_of_set(entry): new_entry[attribute] = entry[attribute] - if attribute in to_dict_of_set(out_entry) and not to_dict_of_set(entry).get(attribute): - new_entry[attribute] = [] + if (attribute in to_dict_of_set(out_entry) and not + to_dict_of_set(entry).get(attribute)): + new_entry[attribute] = [] self.update(target_dn, new_entry) else: self.create(target_dn, entry)