summaryrefslogtreecommitdiffstats
path: root/ipa-admintools/ipa-adddelegation
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2007-11-15 10:27:59 -0500
committerRob Crittenden <rcritten@redhat.com>2007-11-15 10:27:59 -0500
commitbfcc044db22f1be48f180c25283b6858999e1642 (patch)
tree4458afb28719c2d155ae0665590278f218dce27d /ipa-admintools/ipa-adddelegation
parent4d96b37de1d6ebd173909a839ecf19386932d9a5 (diff)
downloadfreeipa-bfcc044db22f1be48f180c25283b6858999e1642.tar.gz
freeipa-bfcc044db22f1be48f180c25283b6858999e1642.tar.xz
freeipa-bfcc044db22f1be48f180c25283b6858999e1642.zip
If unable to connect to the XML-RPC server print a more useful error msg.
Diffstat (limited to 'ipa-admintools/ipa-adddelegation')
-rw-r--r--ipa-admintools/ipa-adddelegation8
1 files changed, 6 insertions, 2 deletions
diff --git a/ipa-admintools/ipa-adddelegation b/ipa-admintools/ipa-adddelegation
index 3ac053e57..53bd43ce2 100644
--- a/ipa-admintools/ipa-adddelegation
+++ b/ipa-admintools/ipa-adddelegation
@@ -31,6 +31,7 @@ import xmlrpclib
import kerberos
import krbV
import ldap
+import errno
def usage():
print "ipa-adddelgation [-a|--attributes attr1,attr2,..,attrn] [-s|--source STRING] [-t|--target STRING] name"
@@ -113,8 +114,11 @@ def main():
aci_entry.setValue('aci', new_aci.export_to_string())
client.update_entry(aci_entry)
- except xmlrpclib.Fault, f:
- print f.faultString
+ except xmlrpclib.Fault, fault:
+ if fault.faultCode == errno.ECONNREFUSED:
+ print "The IPA XML-RPC service is not responding."
+ else:
+ print fault.faultString
return 1
except kerberos.GSSError, e:
print "Could not initialize GSSAPI: %s/%s" % (e[0][0][0], e[0][1][0])