Revert "Save/restore paused status in decorator to prevent functions like config-changed from overwriting it"

This commit is contained in:
Corey Bryant 2015-10-13 08:53:41 +00:00
parent 1dbd144445
commit 85676e54b0
1 changed files with 1 additions and 6 deletions

View File

@ -24,7 +24,6 @@ from charmhelpers.core.hookenv import (
INFO,
ERROR,
status_get,
status_set,
)
DEFAULT_LOOPBACK_SIZE = '5G'
@ -98,11 +97,7 @@ def pause_aware_restart_on_change(restart_map):
"""Avoids restarting services if config changes when unit is paused."""
def wrapper(f):
if is_paused():
# save/restore paused status in case called function changes it
status, message = status_get()
ret = f
status_set(status, message)
return ret
return f
else:
return restart_on_change(restart_map)(f)
return wrapper