summaryrefslogtreecommitdiff
path: root/giscanner/gdumpparser.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/gdumpparser.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/gdumpparser.py')
-rw-r--r--giscanner/gdumpparser.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
index c0b13f4a..79525030 100644
--- a/giscanner/gdumpparser.py
+++ b/giscanner/gdumpparser.py
@@ -165,7 +165,7 @@ blob containing data gleaned from GObject's primitive introspection."""
try:
try:
subprocess.check_call(args, stdout=sys.stdout, stderr=sys.stderr)
- except subprocess.CalledProcessError, e:
+ except subprocess.CalledProcessError as e:
# Clean up temporaries
raise SystemExit(e)
return parse(out_path)
@@ -251,7 +251,7 @@ blob containing data gleaned from GObject's primitive introspection."""
(get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
try:
enum_name = self._transformer.strip_identifier(type_name)
- except TransformerException, e:
+ except TransformerException as e:
message.fatal(e)
# The scanned member values are more accurate than the values that the
@@ -316,7 +316,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
(get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
try:
object_name = self._transformer.strip_identifier(type_name)
- except TransformerException, e:
+ except TransformerException as e:
message.fatal(e)
node = ast.Class(object_name, None,
gtype_name=type_name,
@@ -346,7 +346,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
(get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
try:
interface_name = self._transformer.strip_identifier(type_name)
- except TransformerException, e:
+ except TransformerException as e:
message.fatal(e)
node = ast.Interface(interface_name, None,
gtype_name=type_name,
@@ -391,7 +391,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
try:
name = self._transformer.strip_identifier(type_name)
- except TransformerException, e:
+ except TransformerException as e:
message.fatal(e)
# This one doesn't go in the main namespace; we associate it with
# the struct or union
@@ -465,7 +465,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
(get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
try:
fundamental_name = self._transformer.strip_identifier(type_name)
- except TransformerException, e:
+ except TransformerException as e:
message.warn(e)
return
@@ -509,7 +509,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
def _pair_boxed_type(self, boxed):
try:
name = self._transformer.strip_identifier(boxed.gtype_name)
- except TransformerException, e:
+ except TransformerException as e:
message.fatal(e)
pair_node = self._namespace.get(name)
if not pair_node: