Compare commits
1 Commits
nilmrun-1.
...
nilmrun-1.
Author | SHA1 | Date | |
---|---|---|---|
2e9ec63675 |
@@ -173,7 +173,7 @@ def _exec_user_code(codeargs): # pragma: no cover (runs in subprocess)
|
|||||||
codeobj = compile(code, '<user-code>', 'exec',
|
codeobj = compile(code, '<user-code>', 'exec',
|
||||||
flags = 0, dont_inherit = 1)
|
flags = 0, dont_inherit = 1)
|
||||||
exec(codeobj, module.__dict__, {})
|
exec(codeobj, module.__dict__, {})
|
||||||
except:
|
except Exception:
|
||||||
try:
|
try:
|
||||||
# Pull out the exception
|
# Pull out the exception
|
||||||
info = sys.exc_info()
|
info = sys.exc_info()
|
||||||
|
@@ -307,6 +307,7 @@ class TestClient(object):
|
|||||||
code=textwrap.dedent("""
|
code=textwrap.dedent("""
|
||||||
import sys
|
import sys
|
||||||
print sys.argv[1].encode('ascii'), sys.argv[2]
|
print sys.argv[1].encode('ascii'), sys.argv[2]
|
||||||
|
sys.exit(0) # also test raising SystemExit
|
||||||
""")
|
""")
|
||||||
status = do(code, ["hello", 123], False)
|
status = do(code, ["hello", 123], False)
|
||||||
eq_(status["log"], "hello 123\n")
|
eq_(status["log"], "hello 123\n")
|
||||||
|
Reference in New Issue
Block a user