Update to pymake tip to pick up bug 700203.

This commit is contained in:
Kyle Huey 2011-11-06 21:53:30 -05:00
parent c6717e54c4
commit 17b2ee39cf
3 changed files with 20 additions and 4 deletions

View File

@ -215,9 +215,13 @@ class PythonJob(Job):
print >>sys.stderr, e
return e.exitcode
except:
print >>sys.stderr, sys.exc_info()[1]
print >>sys.stderr, traceback.print_exc()
return -127
e = sys.exc_info()[1]
if isinstance(e, SystemExit) and e.code == '0':
pass # sys.exit(0) is not a failure
else:
print >>sys.stderr, e
print >>sys.stderr, traceback.print_exc()
return -127
finally:
os.environ = oldenv
return 0

View File

@ -0,0 +1,8 @@
#T gmake skip
CMD = %pycmd asplode
PYCOMMANDPATH = $(TESTPATH) $(TESTPATH)/subdir
all:
$(CMD) 0
@echo TEST-PASS

View File

@ -1,4 +1,4 @@
import os
import os, sys
def writetofile(args):
with open(args[0], 'w') as f:
@ -7,3 +7,7 @@ def writetofile(args):
def writeenvtofile(args):
with open(args[0], 'w') as f:
f.write(os.environ[args[1]])
def asplode(args):
sys.exit(args[0])
return 0