Revert "Save/restore paused status in decorator to prevent functions like config-changed from overwriting it"
This commit is contained in:
@@ -1001,11 +1001,7 @@ def pause_aware_restart_on_change(restart_map):
|
|||||||
"""Avoids restarting services if config changes when unit is paused."""
|
"""Avoids restarting services if config changes when unit is paused."""
|
||||||
def wrapper(f):
|
def wrapper(f):
|
||||||
if is_paused():
|
if is_paused():
|
||||||
# save/restore paused status in case called function changes it
|
return f
|
||||||
status, message = status_get()
|
|
||||||
ret = f
|
|
||||||
status_set(status, message)
|
|
||||||
return ret
|
|
||||||
else:
|
else:
|
||||||
return restart_on_change(restart_map)(f)
|
return restart_on_change(restart_map)(f)
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user