- except xmlrpclib.Fault, fault:
- raise BootManagerException, "API Fault: %s" % fault
- except xmlrpclib.ProtocolError, err:
- raise BootManagerException,"XML RPC protocol error: %s" % err
- except xml.parsers.expat.ExpatError, err:
- raise BootManagerException,"XML parsing error: %s" % err
+ except xmlrpclib.Fault as fault:
+ raise BootManagerException("API Fault: {}".format(fault))
+ except xmlrpclib.ProtocolError as err:
+ raise BootManagerException("XML RPC protocol error: {}".format(err))
+ except xml.parsers.expat.ExpatError as err:
+ raise BootManagerException("XML parsing error: {}".format(err))