Hi<div>I am trying to handle exceptions for a xmlrpc class interfacing with cobbler.</div><div><br></div><div>The exception:</div><div><br></div><div> xmlrpclib.Fault: <Fault 1: "cobbler.cexceptions.CX:'invalid profile name: test_profile'"></div>
<div><br></div><div><br></div><div>and the experimental code.</div><div><br></div><div><div> try:</div><div> server = xmlrpclib.Server("<a href="http://192.168.2.11/cobbler_api">http://192.168.2.11/cobbler_api</a>")</div>
<div> #...</div><div> except xmlrpclib.Fault as detail:</div><div><br></div><div> print 'xmlrpc error'</div><div> print detail</div><div># print detail.arguments</div><div> print repr(detail)</div>
<div><br></div></div><div>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.</div>
<div><br></div><div>Regards</div><div><br></div><div>-- <br>Gerhardus Geldenhuis<br>
</div>