29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
|
Subject: Replace 'StandardError' with 'Exception'
|
||
|
From: Radostin Stoyanov rstoyanov1@gmail.com Wed Oct 11 12:36:01 2017 +0100
|
||
|
Date: Fri Oct 20 13:18:31 2017 -0400:
|
||
|
Git: 37ea520773bc7339e114915daac1ca1a8a0334bd
|
||
|
|
||
|
Python 2 has an exception class called StandardError that has
|
||
|
been removed in Python 3. Use Exception instead. [1]
|
||
|
|
||
|
[1] http://python3porting.com/differences.html#standarderror
|
||
|
|
||
|
diff --git a/virtconv/ovf.py b/virtconv/ovf.py
|
||
|
index 3ba21313..16ec5681 100644
|
||
|
--- a/virtconv/ovf.py
|
||
|
+++ b/virtconv/ovf.py
|
||
|
@@ -269,10 +269,9 @@ def _import_file(doc, ctx, conn, input_file):
|
||
|
|
||
|
if not bool_val(env_node.prop("required")):
|
||
|
continue
|
||
|
- raise StandardError(_("OVF section '%s' is listed as "
|
||
|
- "required, but parser doesn't know "
|
||
|
- "how to handle it.") %
|
||
|
- env_node.name)
|
||
|
+ raise Exception(_("OVF section '%s' is listed as "
|
||
|
+ "required, but parser doesn't know "
|
||
|
+ "how to handle it.") % env_node.name)
|
||
|
|
||
|
disk_buses = {}
|
||
|
for node in ctx.xpathEval(vhbase % DEVICE_IDE_BUS):
|