mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
trying to fix #1886
This commit is contained in:
parent
7e55a791b6
commit
131760e30c
1 changed files with 3 additions and 7 deletions
|
@ -26,7 +26,7 @@ from glob import glob
|
|||
from datetime import datetime
|
||||
|
||||
from moulinette import m18n
|
||||
from yunohost.diagnosis import diagnosis_ignore, diagnosis_unignore
|
||||
from yunohost.diagnosis import _diagnosis_ignore
|
||||
from yunohost.utils.error import YunohostError, YunohostValidationError
|
||||
from moulinette.utils.process import check_output
|
||||
from moulinette.utils.log import getActionLogger
|
||||
|
@ -297,9 +297,7 @@ def service_enable(names):
|
|||
names = [names]
|
||||
for name in names:
|
||||
if _run_service_command("enable", name):
|
||||
services = _get_services()
|
||||
if name in services:
|
||||
diagnosis_unignore({"services": [{"service": name}]})
|
||||
_diagnosis_ignore(remove_filter="services", list=f"service={name}")
|
||||
logger.success(m18n.n("service_enabled", service=name))
|
||||
else:
|
||||
raise YunohostError(
|
||||
|
@ -319,9 +317,7 @@ def service_disable(names):
|
|||
names = [names]
|
||||
for name in names:
|
||||
if _run_service_command("disable", name):
|
||||
services = _get_services()
|
||||
if name in services:
|
||||
diagnosis_ignore({"services": [{"service": name}]})
|
||||
_diagnosis_ignore(add_filter="services", list=f"service={name}")
|
||||
logger.success(m18n.n("service_disabled", service=name))
|
||||
else:
|
||||
raise YunohostError(
|
||||
|
|
Loading…
Add table
Reference in a new issue