Skip to content

Commit 9aa6144

Browse files
committed
python except as
1 parent 5fda247 commit 9aa6144

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

devtools/fixeol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def fix_source_eol( path, is_dry_run = True, verbose = True, eol = '\n' ):
66
raise ValueError( 'Path "%s" is not a file' % path )
77
try:
88
f = open(path, 'rb')
9-
except IOError, msg:
9+
except IOError as msg:
1010
print >> sys.stderr, "%s: I/O Error: %s" % (file, str(msg))
1111
return False
1212
try:

makerelease.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def svn_check_if_tag_exist( tag_url ):
8484
"""
8585
try:
8686
list_stdout = svn_command( 'list', tag_url )
87-
except SVNError, e:
87+
except SVNError as e:
8888
if e.returncode != 1 or not str(e).find('tag_url'):
8989
raise e
9090
# otherwise ignore error, meaning tag does not exist

test/runjsontests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def safeGetLine( lines, index ):
3434
def safeReadFile( path ):
3535
try:
3636
return file( path, 'rt' ).read()
37-
except IOError, e:
37+
except IOError as e:
3838
return '<File "%s" is missing: %s>' % (path,e)
3939

4040
def runAllTests( jsontest_executable_path, input_dir = None,

0 commit comments

Comments
 (0)