mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
avoid termination message when term is internal
This commit is contained in:
parent
f50b381dba
commit
1b8dec9c88
2 changed files with 4 additions and 3 deletions
|
@ -91,7 +91,8 @@ class AdHocCLI(CLI):
|
||||||
|
|
||||||
def _terminate(self, signum=None, framenum=None):
|
def _terminate(self, signum=None, framenum=None):
|
||||||
if signum is not None:
|
if signum is not None:
|
||||||
raise SystemExit("Interrupt detected, shutting down gracefully")
|
display.debug("Termination signal detected, shutting down gracefully")
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
''' use Runner lib to do SSH things '''
|
''' use Runner lib to do SSH things '''
|
||||||
|
|
|
@ -208,8 +208,8 @@ class PlaybookExecutor:
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _terminate(self, signum=None, framenum=None):
|
def _terminate(self, signum=None, framenum=None):
|
||||||
display.debug(framenum)
|
display.debug("Termination signal detected, shutting down gracefully")
|
||||||
raise SystemExit("Terminating run due to external signal")
|
raise SystemExit
|
||||||
|
|
||||||
def _get_serialized_batches(self, play):
|
def _get_serialized_batches(self, play):
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue