Changeset View
Changeset View
Standalone View
Standalone View
pykolab/auth/ldap/syncrepl.py
Show All 16 Lines | class DNSync(ldap.ldapobject.LDAPObject,ldap.syncrepl.SyncreplConsumer): | ||||
callback = None | callback = None | ||||
def __init__(self, filename, *args, **kwargs): | def __init__(self, filename, *args, **kwargs): | ||||
if kwargs.has_key('callback'): | if kwargs.has_key('callback'): | ||||
self.callback = kwargs['callback'] | self.callback = kwargs['callback'] | ||||
del kwargs['callback'] | del kwargs['callback'] | ||||
ldap.ldapobject.LDAPObject.__init__(self, *args, **kwargs) | ldap.ldapobject.LDAPObject.__init__(self, *args, **kwargs) | ||||
self.__db = anydbm.open(filename, 'c', 0640) | self.__db = anydbm.open(filename, 'c', 0o640) | ||||
self.__presentUUIDs = {} | self.__presentUUIDs = {} | ||||
def syncrepl_set_cookie(self,cookie): | def syncrepl_set_cookie(self,cookie): | ||||
self.__db['cookie'] = cookie | self.__db['cookie'] = cookie | ||||
def syncrepl_get_cookie(self): | def syncrepl_get_cookie(self): | ||||
if 'cookie' in self.__db: | if 'cookie' in self.__db: | ||||
return self.__db['cookie'] | return self.__db['cookie'] | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |