Skip to content

Commit

Permalink
python except as
Browse files Browse the repository at this point in the history
  • Loading branch information
cdunn2001 committed Nov 20, 2014
1 parent 5fda247 commit 9aa6144
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion devtools/fixeol.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def fix_source_eol( path, is_dry_run = True, verbose = True, eol = '\n' ):
raise ValueError( 'Path "%s" is not a file' % path )
try:
f = open(path, 'rb')
except IOError, msg:
except IOError as msg:
print >> sys.stderr, "%s: I/O Error: %s" % (file, str(msg))
return False
try:
Expand Down
2 changes: 1 addition & 1 deletion makerelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def svn_check_if_tag_exist( tag_url ):
"""
try:
list_stdout = svn_command( 'list', tag_url )
except SVNError, e:
except SVNError as e:
if e.returncode != 1 or not str(e).find('tag_url'):
raise e
# otherwise ignore error, meaning tag does not exist
Expand Down
2 changes: 1 addition & 1 deletion test/runjsontests.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def safeGetLine( lines, index ):
def safeReadFile( path ):
try:
return file( path, 'rt' ).read()
except IOError, e:
except IOError as e:
return '<File "%s" is missing: %s>' % (path,e)

def runAllTests( jsontest_executable_path, input_dir = None,
Expand Down

0 comments on commit 9aa6144

Please sign in to comment.