mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge branch '2018.3' into network_dns_check_test
This commit is contained in:
commit
055eadc1c0
@ -806,7 +806,7 @@ def default_signals(*signals):
|
|||||||
old_signals = {}
|
old_signals = {}
|
||||||
for signum in signals:
|
for signum in signals:
|
||||||
try:
|
try:
|
||||||
old_signals[signum] = signal.getsignal(signum)
|
saved_signal = signal.getsignal(signum)
|
||||||
signal.signal(signum, signal.SIG_DFL)
|
signal.signal(signum, signal.SIG_DFL)
|
||||||
except ValueError as exc:
|
except ValueError as exc:
|
||||||
# This happens when a netapi module attempts to run a function
|
# This happens when a netapi module attempts to run a function
|
||||||
@ -816,6 +816,8 @@ def default_signals(*signals):
|
|||||||
'Failed to register signal for signum %d: %s',
|
'Failed to register signal for signum %d: %s',
|
||||||
signum, exc
|
signum, exc
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
old_signals[signum] = saved_signal
|
||||||
|
|
||||||
# Do whatever is needed with the reset signals
|
# Do whatever is needed with the reset signals
|
||||||
yield
|
yield
|
||||||
|
Loading…
Reference in New Issue
Block a user