[fix] Regen conf for specific service

This commit is contained in:
kload 2015-09-29 07:26:53 -04:00
parent 1ca528f6ce
commit 3804873142
2 changed files with 7 additions and 6 deletions

View file

@ -189,14 +189,15 @@ def hook_callback(action, hooks=[], args=None):
# Add similar hooks to the list
# For example: Having a 16-postfix hook in the list will execute a
# xx-postfix_dkim as well
all_hooks = []
for n in hooks:
for key in hooks.keys():
if key.startswith("%s_" % n) \
and n not in hooks:
hooks.append(n)
for key in hooks_names.keys():
if key == n or key.startswith("%s_" % n) \
and key not in all_hooks:
all_hooks.append(key)
# Iterate over given hooks names list
for n in hooks:
for n in all_hooks:
try:
hl = hooks_names[n]
except KeyError:

View file

@ -292,7 +292,7 @@ def service_regenconf(service=None, force=False):
if service not in _get_services().keys():
raise MoulinetteError(errno.EINVAL, m18n.n('service_unknown', service))
hook_callback('conf_regen', [service] , args=[arg_force])
hook_callback('conf_regen', [service] , args=[force])
msignals.display(m18n.n('service_configured', service), 'success')