[Tutor] Handling exceptions
gerhardus.geldenhuis at gmail.com
Mon Nov 7 12:52:24 CET 2011
I am trying to handle exceptions for a xmlrpc class interfacing with
xmlrpclib.Fault: <Fault 1: "cobbler.cexceptions.CX:'invalid profile name:
and the experimental code.
server = xmlrpclib.Server("http://192.168.2.11/cobbler_api")
except xmlrpclib.Fault as detail:
print 'xmlrpc error'
# print detail.arguments
I don't understand what I am getting from the exception. Do I only get a
string and is the above snippet a good/clean/nice way of handling it. If I
only get a string then it is likely that I will have to have few if's to
handle the various error strings returned.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor