mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 788971 - Pymake chokes when native commands raise exceptions without a "code" attribute. r=ted
This commit is contained in:
parent
afc84f088e
commit
94d899b9ce
@ -264,8 +264,8 @@ class PythonJob(Job):
|
||||
pass # sys.exit(0) is not a failure
|
||||
else:
|
||||
print >>sys.stderr, e
|
||||
print >>sys.stderr, traceback.print_exc()
|
||||
return (e.code if isinstance(e.code, int) else 1)
|
||||
traceback.print_exc()
|
||||
return -127
|
||||
finally:
|
||||
os.environ.clear()
|
||||
os.environ.update(oldenv)
|
||||
|
9
build/pymake/tests/native-command-raise.mk
Normal file
9
build/pymake/tests/native-command-raise.mk
Normal file
@ -0,0 +1,9 @@
|
||||
#T gmake skip
|
||||
#T returncode: 2
|
||||
#T grep-for: "Exception: info-exception"
|
||||
|
||||
CMD = %pycmd asplode_raise
|
||||
PYCOMMANDPATH = $(TESTPATH) $(TESTPATH)/subdir
|
||||
|
||||
all:
|
||||
@$(CMD) info-exception
|
@ -30,3 +30,6 @@ def asplode(args):
|
||||
def asplode_return(args):
|
||||
arg0 = convertasplode(args[0])
|
||||
return arg0
|
||||
|
||||
def asplode_raise(args):
|
||||
raise Exception(args[0])
|
||||
|
Loading…
Reference in New Issue
Block a user