Switch to python3 style 'except X as Y' notation

Which also works with python2.7
This commit is contained in:
Cole Robinson
2017-05-05 12:47:21 -04:00
parent fcebefd3bb
commit 62feeb02a8
56 changed files with 217 additions and 217 deletions

View File

@@ -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

View File

@@ -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))