1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python-samba-tool domain classicupgrade: Make failure to connect directly to the LDAP backend fatal

This is better than failing just a little further down the stack with a useless error
about use-before-set.

Andrew Bartlett

Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Andrew Bartlett 2013-04-05 15:23:20 +11:00 committed by Michael Adam
parent 45a596fbe9
commit e7e37b3b90

View File

@ -791,7 +791,7 @@ Please fix this account before attempting to upgrade again
try: try:
ldb_object = Ldb(url, credentials=creds) ldb_object = Ldb(url, credentials=creds)
except ldb.LdbError, e: except ldb.LdbError, e:
logger.warning("Could not open ldb connection to %s, the error message is: %s", url, e) raise ProvisiongError("Could not open ldb connection to %s, the error message is: %s" % (url, e))
else: else:
break break
logger.info("Exporting posix attributes") logger.info("Exporting posix attributes")