mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 13:21:25 -07:00
Add missing ansible-test --remote-terminate support. (#32918)
* Expand ansible-test --remote-terminate support: - windows-integration - network-integration These commands previously accepted the option, but did not support it. * Terminate windows and network instances when done.
This commit is contained in:
parent
e5b3f60a74
commit
6472723ba8
4 changed files with 41 additions and 6 deletions
|
@ -23,6 +23,7 @@ class WrappedThread(threading.Thread):
|
|||
super(WrappedThread, self).__init__()
|
||||
self._result = queue.Queue()
|
||||
self.action = action
|
||||
self.result = None
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
|
@ -41,9 +42,13 @@ class WrappedThread(threading.Thread):
|
|||
:rtype: any
|
||||
"""
|
||||
result, exception = self._result.get()
|
||||
|
||||
if exception:
|
||||
if sys.version_info[0] > 2:
|
||||
raise exception[1].with_traceback(exception[2])
|
||||
# noinspection PyRedundantParentheses
|
||||
exec('raise exception[0], exception[1], exception[2]') # pylint: disable=locally-disabled, exec-used
|
||||
|
||||
self.result = result
|
||||
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue