summaryrefslogtreecommitdiffstats
path: root/virt-bootstrap.py
diff options
context:
space:
mode:
authorRadostin Stoyanov <rstoyanov1@gmail.com>2017-04-13 15:06:30 +0100
committerCédric Bosdonnat <cbosdonnat@suse.com>2017-04-14 10:28:56 +0200
commitf930f38143ab2dc5fd4b570f3a7bcf599ed9b344 (patch)
tree19044e7a6334aac41d54fcf70e8b42f28512f1a7 /virt-bootstrap.py
parent2029673ce7febf2e2e42a8226828648494440963 (diff)
downloadvirt-bootstrap.git-f930f38143ab2dc5fd4b570f3a7bcf599ed9b344.tar.gz
virt-bootstrap.git-f930f38143ab2dc5fd4b570f3a7bcf599ed9b344.tar.xz
virt-bootstrap.git-f930f38143ab2dc5fd4b570f3a7bcf599ed9b344.zip
Python 3/2 compatibility: exceptions handling
Examine an exception during exception handling in Python3 is done with 'as' instead of comma. This approach works in Python2 as well. https://wiki.python.org/moin/HandlingExceptions
Diffstat (limited to 'virt-bootstrap.py')
-rw-r--r--virt-bootstrap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt-bootstrap.py b/virt-bootstrap.py
index 3cd520a..e475cd4 100644
--- a/virt-bootstrap.py
+++ b/virt-bootstrap.py
@@ -107,9 +107,9 @@ Example supported URI formats:
bootstrap(args)
sys.exit(0)
- except KeyboardInterrupt, e:
+ except KeyboardInterrupt as e:
sys.exit(0)
- except ValueError, e:
+ except ValueError as e:
for line in e:
for l in line:
sys.stderr.write("%s: %s\n" % (sys.argv[0], l))