summaryrefslogtreecommitdiff
path: root/giscanner/dumper.py
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2012-10-31 17:37:47 +0100
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-04-09 23:13:04 +0200
commit2806ee7c7db81be0ad164caf68b70163df24386d (patch)
tree3fe72bc89260e8b76cae9c18e676832fe6d84653 /giscanner/dumper.py
parent93ea709aa40f84e9c5677a7faab345a30072a968 (diff)
downloadgobject-introspection-2806ee7c7db81be0ad164caf68b70163df24386d.tar.gz
giscanner: prefer "except X as e" over "except X, e"
It's more readable and as an added bonus Python 3 compatible. https://bugzilla.gnome.org/show_bug.cgi?id=697616
Diffstat (limited to 'giscanner/dumper.py')
-rw-r--r--giscanner/dumper.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index d95ea6ba..f5346a40 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -166,14 +166,14 @@ class DumpCompiler(object):
try:
self._compile(o_path, c_path)
- except CompilerError, e:
+ except CompilerError as e:
if not utils.have_debug_flag('save-temps'):
shutil.rmtree(tmpdir)
raise SystemExit('compilation of temporary binary failed:' + str(e))
try:
self._link(bin_path, o_path)
- except LinkerError, e:
+ except LinkerError as e:
if not utils.have_debug_flag('save-temps'):
shutil.rmtree(tmpdir)
raise SystemExit('linking of temporary binary failed: ' + str(e))
@@ -236,7 +236,7 @@ class DumpCompiler(object):
sys.stdout.flush()
try:
subprocess.check_call(args)
- except subprocess.CalledProcessError, e:
+ except subprocess.CalledProcessError as e:
raise CompilerError(e)
def _link(self, output, *sources):
@@ -290,7 +290,7 @@ class DumpCompiler(object):
sys.stdout.flush()
try:
subprocess.check_call(args)
- except subprocess.CalledProcessError, e:
+ except subprocess.CalledProcessError as e:
raise LinkerError(e)
def _add_link_internal_args(self, args, libtool):