mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Flake8
This commit is contained in:
parent
0a52430186
commit
aeeac12309
3 changed files with 11 additions and 11 deletions
|
@ -36,7 +36,6 @@ import urllib.parse
|
|||
import tempfile
|
||||
from collections import OrderedDict
|
||||
|
||||
from moulinette.interfaces.cli import colorize
|
||||
from moulinette import Moulinette, m18n
|
||||
from moulinette.core import MoulinetteError
|
||||
from moulinette.utils.log import getActionLogger
|
||||
|
@ -54,7 +53,7 @@ from moulinette.utils.filesystem import (
|
|||
)
|
||||
|
||||
from yunohost.service import service_status, _run_service_command
|
||||
from yunohost.utils import packages, config
|
||||
from yunohost.utils import packages
|
||||
from yunohost.utils.config import (
|
||||
ConfigPanel,
|
||||
parse_args_in_yunohost_format,
|
||||
|
@ -1764,8 +1763,8 @@ def app_config_get(app, key="", mode="classic"):
|
|||
"""
|
||||
Display an app configuration in classic, full or export mode
|
||||
"""
|
||||
config = AppConfigPanel(app)
|
||||
return config.get(key, mode)
|
||||
config_ = AppConfigPanel(app)
|
||||
return config_.get(key, mode)
|
||||
|
||||
|
||||
@is_unit_operation()
|
||||
|
@ -1776,12 +1775,12 @@ def app_config_set(
|
|||
Apply a new app configuration
|
||||
"""
|
||||
|
||||
config = AppConfigPanel(app)
|
||||
config_ = AppConfigPanel(app)
|
||||
|
||||
YunoHostArgumentFormatParser.operation_logger = operation_logger
|
||||
operation_logger.start()
|
||||
|
||||
result = config.set(key, value, args, args_file)
|
||||
result = config_.set(key, value, args, args_file)
|
||||
if "errors" not in result:
|
||||
operation_logger.success()
|
||||
return result
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
|
||||
import os
|
||||
import re
|
||||
import toml
|
||||
import urllib.parse
|
||||
import tempfile
|
||||
import shutil
|
||||
from collections import OrderedDict
|
||||
|
||||
from moulinette.interfaces.cli import colorize
|
||||
|
@ -37,8 +37,6 @@ from moulinette.utils.filesystem import (
|
|||
mkdir,
|
||||
)
|
||||
|
||||
from yunohost.service import _get_services
|
||||
from yunohost.service import _run_service_command, _get_services
|
||||
from yunohost.utils.i18n import _value_for_locale
|
||||
from yunohost.utils.error import YunohostError, YunohostValidationError
|
||||
|
||||
|
@ -144,7 +142,7 @@ class ConfigPanel:
|
|||
|
||||
if self.errors:
|
||||
return {
|
||||
"errors": errors,
|
||||
"errors": self.errors,
|
||||
}
|
||||
|
||||
self._reload_services()
|
||||
|
@ -290,6 +288,9 @@ class ConfigPanel:
|
|||
write_to_yaml(self.save_path, self.new_values)
|
||||
|
||||
def _reload_services(self):
|
||||
|
||||
from yunohost.service import _run_service_command, _get_services
|
||||
|
||||
logger.info("Reloading services...")
|
||||
services_to_reload = set()
|
||||
for panel, section, obj in self._iterate(["panel", "section", "option"]):
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
along with this program; if not, see http://www.gnu.org/licenses
|
||||
|
||||
"""
|
||||
from moulinette import Moulinette, m18n
|
||||
from moulinette import m18n
|
||||
|
||||
|
||||
def _value_for_locale(values):
|
||||
|
|
Loading…
Add table
Reference in a new issue