diff options
author | Howard Chu <hyc@symas.com> | 2013-09-17 08:19:47 -0700 |
---|---|---|
committer | Nadezhda Ivanova <nivanova@samba.org> | 2013-09-18 07:43:09 +0200 |
commit | ff886940272354743cd6eb50717891454d8e5500 (patch) | |
tree | 2fc244490fe1db05e6582d50a06069394eac8aa2 /python | |
parent | 68a4081dd47344651cb4dfdf57247ce8e893a96e (diff) | |
download | samba-ff886940272354743cd6eb50717891454d8e5500.tar.gz samba-ff886940272354743cd6eb50717891454d8e5500.tar.bz2 samba-ff886940272354743cd6eb50717891454d8e5500.zip |
Give slapd a second to startup
Moving the sleep to the beginning of the loop avoids most
occurrences of the "connection failed" message
Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Wed Sep 18 07:43:09 CEST 2013 on sn-devel-104
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/provision/backend.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/samba/provision/backend.py b/python/samba/provision/backend.py index 58aab9829f..24d8675258 100644 --- a/python/samba/provision/backend.py +++ b/python/samba/provision/backend.py @@ -292,6 +292,7 @@ class LDAPBackend(ProvisionBackend): while self.slapd.poll() is None: # Wait until the socket appears try: + time.sleep(1) ldapi_db = Ldb(self.ldap_uri, lp=self.lp, credentials=self.credentials) ldapi_db.search(base="", scope=SCOPE_BASE, expression="(objectClass=OpenLDAProotDSE)") @@ -299,7 +300,6 @@ class LDAPBackend(ProvisionBackend): # the LDAP server! return except LdbError: - time.sleep(1) count = count + 1 if count > 15: |