Skip to content

Commit

Permalink
Fix python_stub_template.txt to be compatible with Python 2.4.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 162949753
  • Loading branch information
philwo authored and buchgr committed Jul 24, 2017
1 parent e619d6a commit ad73cba
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def Main():
exit(retCode)
else:
os.execv(args[0], args)
except EnvironmentError as e:
except EnvironmentError:
# This works from Python 2.4 all the way to 3.x.
e = sys.exc_info()[1]
# This exception occurs when os.execv() fails for some reason.
if not getattr(e, 'filename', None):
e.filename = program # Add info to error message
Expand Down

0 comments on commit ad73cba

Please sign in to comment.