summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-11-12 10:08:05 -0500
committerRob Crittenden <rcritten@redhat.com>2008-11-12 15:54:54 -0500
commit865b73e80369bdd8a7b44c723654984de36dd4e1 (patch)
tree3061423f97248a5b3bf83a73b6fd210b6ded08ce
parent2fb4df504cdc9fe196ce8b13634736a53f7837f8 (diff)
downloadfreeipa-865b73e80369bdd8a7b44c723654984de36dd4e1.zip
freeipa-865b73e80369bdd8a7b44c723654984de36dd4e1.tar.gz
freeipa-865b73e80369bdd8a7b44c723654984de36dd4e1.tar.xz
Present a less-cryptic error if the replication agreement doesn't exist
-rwxr-xr-xipa-server/ipa-install/ipa-replica-manage5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipa-server/ipa-install/ipa-replica-manage b/ipa-server/ipa-install/ipa-replica-manage
index c0051c7..fdd803f 100755
--- a/ipa-server/ipa-install/ipa-replica-manage
+++ b/ipa-server/ipa-install/ipa-replica-manage
@@ -95,7 +95,10 @@ def list_masters(replman, verbose):
print " last update ended: %s" % str(ipautil.parse_generalized_time(entry.nsds5replicalastupdateend))
def del_master(replman, hostname):
- t = replman.get_agreement_type(hostname)
+ try:
+ t = replman.get_agreement_type(hostname)
+ except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
+ print "No replication agreement found for %s" % hostname
if t == replication.IPA_REPLICA:
dirman_passwd = getpass.getpass("Directory Manager password (%s): " % hostname)