summaryrefslogtreecommitdiffstats
path: root/install/po
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-07-30 16:49:29 +0200
committerTomas Babej <tbabej@redhat.com>2015-08-12 18:17:23 +0200
commit27dabb45282911e375336f75934af9dd6cc5d963 (patch)
tree3c8fe5255d60613fa9cd14d053b3688feed740c9 /install/po
parenta651be3eec2a08bd2865b16b0eed767db69aab0f (diff)
downloadfreeipa-27dabb45282911e375336f75934af9dd6cc5d963.tar.gz
freeipa-27dabb45282911e375336f75934af9dd6cc5d963.tar.xz
freeipa-27dabb45282911e375336f75934af9dd6cc5d963.zip
Modernize 'except' clauses
The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'install/po')
-rwxr-xr-xinstall/po/pygettext.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/install/po/pygettext.py b/install/po/pygettext.py
index 4e4212eba..171bd4fc5 100755
--- a/install/po/pygettext.py
+++ b/install/po/pygettext.py
@@ -664,7 +664,7 @@ def main():
'style=', 'verbose', 'version', 'width=', 'exclude-file=',
'docstrings', 'no-docstrings',
])
- except getopt.error, msg:
+ except getopt.error as msg:
usage(1, msg)
# for holding option values
@@ -787,7 +787,7 @@ def main():
eater.set_filename(filename)
try:
tokenize.tokenize(fp.readline, eater)
- except tokenize.TokenError, e:
+ except tokenize.TokenError as e:
print >> sys.stderr, '%s: %s, line %d, column %d' % (
e[0], filename, e[1][0], e[1][1])
finally: