From 76f2d2eac2188fc7929bb07ab6bba7af745e8998 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 10 Feb 2011 14:46:38 -0500 Subject: 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 --- install/tools/ipa-compat-manage | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'install/tools/ipa-compat-manage') diff --git a/install/tools/ipa-compat-manage b/install/tools/ipa-compat-manage index bc88cd3a7..c990f9d42 100755 --- a/install/tools/ipa-compat-manage +++ b/install/tools/ipa-compat-manage @@ -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 -- cgit