python except as

This commit is contained in:
Christopher Dunn
2014-11-19 23:10:02 -06:00
parent 5fda247dab
commit 9aa6144b2a
3 changed files with 3 additions and 3 deletions

View File

@@ -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: