Present a less-cryptic error if the replication agreement doesn't exist

This commit is contained in:
Rob Crittenden
2008-11-12 10:08:05 -05:00
parent 17261c2520
commit 93c2e4e3b4

View File

@@ -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)