mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Handle bad DM password in ipa-host-net-manage & ipa-copmat-manage.
This was resulting in a traceback because while conn was not None it wasn't connected either. ticket 920
This commit is contained in:
parent
6880daefee
commit
76f2d2eac2
@ -101,6 +101,8 @@ def main():
|
||||
)
|
||||
except errors.LDAPError, lde:
|
||||
sys.exit("An error occurred while connecting to the server.\n%s\n" % str(lde))
|
||||
except errors.ACIError, e:
|
||||
sys.exit("Authentication failed: %s" % e.info)
|
||||
|
||||
if args[0] == "status":
|
||||
try:
|
||||
@ -165,7 +167,7 @@ def main():
|
||||
retval = 1
|
||||
|
||||
finally:
|
||||
if conn:
|
||||
if conn.isconnected():
|
||||
conn.disconnect()
|
||||
|
||||
return retval
|
||||
|
@ -105,6 +105,8 @@ def main():
|
||||
except errors.LDAPError, lde:
|
||||
sys.exit("An error occurred while connecting to the server.\n%s\n" %
|
||||
str(lde))
|
||||
except errors.ACIError, e:
|
||||
sys.exit("Authentication failed: %s" % e.info)
|
||||
|
||||
if args[0] == "status":
|
||||
try:
|
||||
@ -191,7 +193,7 @@ def main():
|
||||
retval = 1
|
||||
|
||||
finally:
|
||||
if conn:
|
||||
if conn.isconnected():
|
||||
conn.disconnect()
|
||||
|
||||
return retval
|
||||
|
Loading…
Reference in New Issue
Block a user