If unable to connect to the XML-RPC server print a more useful error msg.

This commit is contained in:
Rob Crittenden
2007-11-15 10:27:59 -05:00
parent 4d96b37de1
commit bfcc044db2
13 changed files with 96 additions and 20 deletions

View File

@@ -23,6 +23,7 @@ from optparse import OptionParser
import ipa.ipaclient as ipaclient
import ipa.config
import errno
import sys
import xmlrpclib
import kerberos
@@ -87,7 +88,10 @@ def main():
print
except xmlrpclib.Fault, fault:
print fault.faultString
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])