summaryrefslogtreecommitdiff
path: root/Tools/i18n/pygettext.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-10 16:19:56 +0000
committerGuido van Rossum <guido@python.org>2007-01-10 16:19:56 +0000
commitb940e113bf90ff71b0ef57414ea2beea9d2a4bc0 (patch)
tree0b9ea19eba1e665dac95126c3140ac2bc36326ad /Tools/i18n/pygettext.py
parent893523e80a2003d4a630aafb84ba016e0070cbbd (diff)
downloadcpython-git-b940e113bf90ff71b0ef57414ea2beea9d2a4bc0.tar.gz
SF patch 1631942 by Collin Winter:
(a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
Diffstat (limited to 'Tools/i18n/pygettext.py')
-rwxr-xr-xTools/i18n/pygettext.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/i18n/pygettext.py b/Tools/i18n/pygettext.py
index eadd149ea4..24f1ce1541 100755
--- a/Tools/i18n/pygettext.py
+++ b/Tools/i18n/pygettext.py
@@ -512,7 +512,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
@@ -635,7 +635,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: