diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 1d4a2ab30..a48400a8e 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -520,7 +520,7 @@ def app_upgrade(app=[], url=None, file=None, force=False): apps = app # Check if disk space available if free_space_in_directory("/") <= 512 * 1000 * 1000: - raise YunohostValidationError("disk_space_not_sufficient_update") + raise YunohostValidationError("disk_space_not_sufficient_update") # If no app is specified, upgrade all apps if not apps: # FIXME : not sure what's supposed to happen if there is a url and a file but no apps... diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index e5f3a0133..279943a9f 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -116,7 +116,7 @@ def domain_add(operation_logger, domain, dyndns=False): domain = domain.lower() # Non-latin characters (e.g. café.com => xn--caf-dma.com) - domain = domain.encode('idna').decode('utf-8') + domain = domain.encode("idna").decode("utf-8") # DynDNS domain if dyndns: diff --git a/src/yunohost/hook.py b/src/yunohost/hook.py index 05e706660..33f5885e2 100644 --- a/src/yunohost/hook.py +++ b/src/yunohost/hook.py @@ -320,7 +320,13 @@ def hook_callback( def hook_exec( - path, args=None, raise_on_error=False, chdir=None, env=None, user="root", return_format="json" + path, + args=None, + raise_on_error=False, + chdir=None, + env=None, + user="root", + return_format="json", ): """ Execute hook from a file with arguments @@ -419,9 +425,9 @@ def _hook_exec_bash(path, args, chdir, env, user, return_format, loggers): # Construct command to execute if user == "root": - command = ['sh', '-c'] + command = ["sh", "-c"] else: - command = ['sudo', '-n', '-u', user, '-H', 'sh', '-c'] + command = ["sudo", "-n", "-u", user, "-H", "sh", "-c"] # use xtrace on fd 7 which is redirected to stdout env["BASH_XTRACEFD"] = "7"