On 01/31/2013 12:03 PM, Tomas Babej wrote:
Hi,

This was a regression due to change from DatabaseError to NetworkError
when LDAP server is down.

https://fedorahosted.org/freeipa/ticket/2939

Tomas

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel
Clicking send too soon, patch attached :)

Tomas
>From 33bb4b90da4ba47624293738811d14393bfbe55c Mon Sep 17 00:00:00 2001
From: Tomas Babej <tba...@redhat.com>
Date: Thu, 31 Jan 2013 05:56:15 -0500
Subject: [PATCH] Prevent backtrace in ipa-replica-prepare

This was a regression due to change from DatabaseError to NetworkError
when LDAP server is down.

https://fedorahosted.org/freeipa/ticket/2939
---
 install/tools/ipa-replica-prepare | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare
index 274e8456af65fad31af4331ba0648aef088ec33a..80094ae8443c0888538e7ee5e58b41e19c9adcbe 100755
--- a/install/tools/ipa-replica-prepare
+++ b/install/tools/ipa-replica-prepare
@@ -278,8 +278,8 @@ def main():
         sys.exit("\nThe password provided is incorrect for LDAP server %s" % api.env.host)
     except errors.LDAPError:
         sys.exit("\nUnable to connect to LDAP server %s" % api.env.host)
-    except errors.DatabaseError, e:
-        sys.exit("\n"+e.desc)
+    except errors.NetworkError, e:
+        sys.exit("\n"+e.error)
 
     try:
         installutils.verify_fqdn(replica_fqdn, local_hostname=False)
-- 
1.8.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to