ansible: fix test failure during process exit.

======================================================================
ERROR: tests.connection_test (unittest2.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
ImportError: Failed to import test module: tests.connection_test
Traceback (most recent call last):
  File "/home/dmw/src/mitogen/.venv/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/dmw/src/mitogen/.venv/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
RuntimeError: not holding the import lock
issue510
David Wilson 6 years ago
parent 1b8748a8d9
commit 6ca2677de5

@ -194,7 +194,10 @@ class MuxProcess(object):
cls.worker_sock = None
self = cls()
self.worker_main()
sys.exit()
# Test frameworks living somewhere higher on the stack of the
# original parent process may try to catch sys.exit(), so do a C
# level exit instead.
os._exit(0)
def worker_main(self):
"""

Loading…
Cancel
Save