Closed choksi81 closed 10 years ago
(Note: The original Trac issue description contained more details, replicated below. The fix for the issue was added in 1736e7bfe5f20fa23fda3cb8ef0f43c670690663.)
mkaplan:
On examining subprocess.py on Ubuntu 11.10, Popen.__del__
calls getattr
.
Adding a traceback:
vm@lapp:~/test$ python repy.py restrictions.twoports ut_repyv2api_sendmessagebasictest.py
File "repy.py", line 224, in main
File "/home/vm/test/virtual_namespace.py", line 113, in evaluate
File "/home/vm/test/safe.py", line 340, in safe_run
File "ut_repyv2api_sendmessagebasictest.py", line 16, in <module>
File "/home/vm/test/namespace.py", line 945, in __do_func_call
File "/home/vm/test/namespace.py", line 1206, in wrapped_function
File "/home/vm/test/emulcomm.py", line 2229, in close
File "/home/vm/test/emulcomm.py", line 835, in _cleanup_socket
File "/usr/lib/python2.7/subprocess.py", line 713, in __del__
File "/home/vm/test/safe.py", line 198, in fnc
Exception exception_hierarchy.RunBuiltinException: RunBuiltinException() in <bound method Popen.__del__ of <subprocess.Popen object at 0xbf9d10>> ignored
It seems that subprocess
requires getatrr
to be made available.
Adding the following line to safe.py
allows the code to run without a problem:
subprocess.getattr = getattr
On Ubuntu 11.04, x86_64, with Python 2.7.1+ the repyv2api unit tests all pass. They also pass with Python 2.7.2, compiled from source.
On Ubuntu 11.10, x86_64, with Python 2.7.2+, some of the unit tests fail with a message:
The problem appears to be related to
socket.close()
, as commenting outs.close()
in the following code allows it to pass the test properly: