Changeset 1220 for dassldapsync
- Timestamp:
- Nov 15, 2016, 11:28:19 AM (8 years ago)
- Location:
- dassldapsync
- Files:
-
- 2 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) -
dassldapsync/dassldapsync.spec
r1218 r1220 6 6 Group: other 7 7 BuildArch: noarch 8 URL: http:// www.dass-it.de/dassldapsync8 URL: http://trac.dass-it.de/pub/browser/dassldapsync 9 9 10 10 Source: %{name}_%{version}.tar.gz … … 13 13 Requires: python >= 2.6 14 14 Requires: python-ldap 15 15 16 %description 16 17 This script compares two different LDAP subtrees and makes … … 24 25 25 26 %build 27 26 28 %install 27 29 mkdir -p "%{buildroot}/usr/sbin" … … 29 31 install -m 644 dassldapsync.conf %{buildroot}/etc/dassldapsync.conf 30 32 install -m 755 dassldapsync.py %{buildroot}/usr/sbin/dassldapsync 33 31 34 %clean 32 35 %{__rm} -rf %{buildroot} … … 34 37 %files 35 38 %defattr(-,root,root) 36 %config /etc/dassldapsync.conf39 %config(noreplace) /etc/dassldapsync.conf 37 40 /usr/sbin/dassldapsync 41 38 42 %changelog 39 43 * Wed Mar 05 2014 Sebastian Lederer slederer@dass-it.de 1.5
Note:
See TracChangeset
for help on using the changeset viewer.