Changeset 1220 for dassldapsync/dassldapsync.py
- Timestamp:
- Nov 15, 2016, 11:28:19 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dassldapsync/dassldapsync.py
r1219 r1220 82 82 return results 83 83 84 class LdapSync :84 class LdapSync(object): 85 85 def __init__(self, destserver,destbinddn,destbindpw,srcbasedn,destbasedn,options=Options()): 86 86 self.logger = logging.getLogger() … … 96 96 self.con = None 97 97 98 self.attrmap=ldap.cidict.cidict({ 99 }) 100 self.classmap={ 101 } 98 self.attrmap=ldap.cidict.cidict({}) 99 self.classmap={} 102 100 103 101 self.junk_attrs = [ "memberof", "modifiersname", "modifytimestamp", "entryuuid", "entrycsn", "contextcsn", "creatorsname", "createtimestamp", "structuralobjectclass", "pwdchangedtime", "pwdfailuretime" ] … … 264 262 self.notify_created(dn) 265 263 result['add']['ok'].append(dn) 266 except (ldap.OBJECT_CLASS_VIOLATION, ldap.NO_SUCH_OBJECT):264 except (ldap.OBJECT_CLASS_VIOLATION, ldap.NO_SUCH_OBJECT, ldap.CONSTRAINT_VIOLATION): 267 265 self.logger.warning("failed to add {}".format(dn)) 268 266 result['add']['failed'].append(dn) … … 360 358 361 359 362 363 364 360 if __name__ == "__main__": 365 361 logging.basicConfig(format='%(levelname)s %(module)s.%(funcName)s: %(message)s', level=logging.INFO)
Note:
See TracChangeset
for help on using the changeset viewer.