mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Switch to python3 style 'except X as Y' notation
Which also works with python2.7
This commit is contained in:
@@ -370,7 +370,7 @@ class ovf_parser(parser_class):
|
||||
|
||||
try:
|
||||
return _xml_parse_wrapper(xml, parse_cb)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
logging.debug("Error parsing OVF XML: %s", str(e))
|
||||
|
||||
return False
|
||||
|
||||
@@ -83,7 +83,7 @@ class _VMXFile(object):
|
||||
try:
|
||||
lineobj = _VMXLine(line)
|
||||
self.lines.append(lineobj)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
raise Exception(_("Syntax error at line %d: %s\n%s") %
|
||||
(len(self.lines) + 1, line.strip(), e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user