New hook syncrepl_refreshdone() in ldap.syncrepl.SyncReplConsumer (th… · python-ldap/python-ldap@8cc2bc0 · GitHub
Skip to content

Commit 8cc2bc0

Browse files
author
stroeder
committed
New hook syncrepl_refreshdone() in ldap.syncrepl.SyncReplConsumer (thanks to Petr Spacek)
1 parent 805824b commit 8cc2bc0

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

CHANGES

Lines changed: 3 additions & 2 deletions

Demo/pyasn1/syncrepl.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def syncrepl_present(self,uuids,refreshDeletes=False):
9393
for uuid in uuids:
9494
self.__presentUUIDs[uuid] = True
9595

96+
def syncrepl_refreshdone(self):
97+
print 'Initial synchronization is now done, persist phase begins'
98+
9699
def perform_application_sync(self,dn,attributes,previous_attributes):
97100
print 'Performing application sync for:', dn
98101
return True
@@ -135,8 +138,8 @@ def commenceShutdown(signum, stack):
135138
'X-BINDPW=password\' db.shelve'
136139
sys.exit(1)
137140
except ValueError,e:
138-
print 'Error parsing command-line arguments:',str(e)
139-
sys.exit(1)
141+
print 'Error parsing command-line arguments:',str(e)
142+
sys.exit(1)
140143

141144
while watcher_running:
142145
print 'Connecting to LDAP server now...'

Lib/ldap/syncrepl.py

Lines changed: 17 additions & 3 deletions

0 commit comments

Comments
 (0)