[gimp-help-2] xml2po/__init__.py: Update syntax to be compatible with Python 2 and Python 3
- From: Michael Schumacher <schumaml src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help-2] xml2po/__init__.py: Update syntax to be compatible with Python 2 and Python 3
- Date: Fri, 28 Apr 2017 23:35:00 +0000 (UTC)
commit 2f289a7e1cf1d90fdec54b3d7f7c78096dc34697
Author: Michael Schumacher <schumaml gmx de>
Date: Sat Apr 29 01:31:22 2017 +0200
xml2po/__init__.py: Update syntax to be compatible with Python 2 and Python 3
tools/xml2po/__init__.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tools/xml2po/__init__.py b/tools/xml2po/__init__.py
index e7b4357..eec1979 100644
--- a/tools/xml2po/__init__.py
+++ b/tools/xml2po/__init__.py
@@ -564,7 +564,7 @@ class Main(object):
raise IOError("Unable to read file '%s'" % xmlfile)
try:
doc = XMLDocument(xmlfile, self)
- except Exception, e:
+ except Exception as e:
print >> sys.stderr, "Unable to parse XML file '%s': %s" % (xmlfile, str(e))
sys.exit(1)
self.current_mode.preProcessXml(doc.doc, self.msg)
@@ -577,7 +577,7 @@ class Main(object):
raise IOError("Unable to read file '%s'" % xmlfile)
try:
doc = XMLDocument(xmlfile, self)
- except Exception, e:
+ except Exception as e:
print >> sys.stderr, str(e)
sys.exit(1)
@@ -606,7 +606,7 @@ class Main(object):
raise IOError("Unable to read file '%s'" % xmlfile)
try:
doc = XMLDocument(xmlfile, self)
- except Exception, e:
+ except Exception as e:
print >> sys.stderr, str(e)
sys.exit(1)
doc.generate_messages()
@@ -614,7 +614,7 @@ class Main(object):
self.msg.translationsFollow()
try:
doc = XMLDocument(origxml, self)
- except Exception, e:
+ except Exception as e:
print >> sys.stderr, str(e)
sys.exit(1)
doc.generate_messages()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]