mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix a few things for service_regen_conf backward compatibility
This commit is contained in:
parent
39891b228c
commit
96bd6f8deb
1 changed files with 10 additions and 2 deletions
|
@ -414,12 +414,20 @@ def service_regen_conf(names=[], with_diff=False, force=False, dry_run=False,
|
|||
list_pending=False):
|
||||
|
||||
services = _get_services()
|
||||
|
||||
if isinstance(names, str):
|
||||
names = [names]
|
||||
|
||||
for name in names:
|
||||
if name not in services:
|
||||
raise YunohostError('service_unknown', service=service)
|
||||
if name not in services.keys():
|
||||
raise YunohostError('service_unknown', service=name)
|
||||
|
||||
if names is []:
|
||||
names = services.keys()
|
||||
|
||||
logger.warning(m18n.n("service_regen_conf_is_deprecated"))
|
||||
|
||||
from yunohost.regenconf import regen_conf
|
||||
return regen_conf(names, with_diff, force, dry_run, list_pending)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue