mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[CI] Format code with Black
This commit is contained in:
parent
232d38f221
commit
aa50526ccd
2 changed files with 12 additions and 6 deletions
|
@ -101,7 +101,9 @@ def firewall_allow(
|
|||
|
||||
# Update and reload firewall
|
||||
_update_firewall_file(firewall)
|
||||
if (not reload_only_if_change and not no_reload) or (reload_only_if_change and changed):
|
||||
if (not reload_only_if_change and not no_reload) or (
|
||||
reload_only_if_change and changed
|
||||
):
|
||||
return firewall_reload()
|
||||
|
||||
|
||||
|
@ -180,7 +182,9 @@ def firewall_disallow(
|
|||
|
||||
# Update and reload firewall
|
||||
_update_firewall_file(firewall)
|
||||
if (not reload_only_if_change and not no_reload) or (reload_only_if_change and changed):
|
||||
if (not reload_only_if_change and not no_reload) or (
|
||||
reload_only_if_change and changed
|
||||
):
|
||||
return firewall_reload()
|
||||
|
||||
|
||||
|
|
|
@ -195,7 +195,6 @@ class AppResource:
|
|||
|
||||
return out, err
|
||||
|
||||
|
||||
def _run_script(self, action, script, env={}):
|
||||
from yunohost.app import (
|
||||
_make_tmp_workdir_for_app,
|
||||
|
@ -226,7 +225,9 @@ ynh_abort_if_errors
|
|||
from yunohost.log import OperationLogger
|
||||
|
||||
# FIXME ? : this is an ugly hack :(
|
||||
active_operation_loggers = [o for o in OperationLogger._instances if o.ended_at is None]
|
||||
active_operation_loggers = [
|
||||
o for o in OperationLogger._instances if o.ended_at is None
|
||||
]
|
||||
if active_operation_loggers:
|
||||
operation_logger = active_operation_loggers[-1]
|
||||
else:
|
||||
|
@ -811,11 +812,12 @@ class AptDependenciesAppResource(AppResource):
|
|||
if self.packages_from_raw_bash:
|
||||
out, err = self.check_output_bash_snippet(self.packages_from_raw_bash)
|
||||
if err:
|
||||
logger.error("Error while running apt resource packages_from_raw_bash snippet:")
|
||||
logger.error(
|
||||
"Error while running apt resource packages_from_raw_bash snippet:"
|
||||
)
|
||||
logger.error(err)
|
||||
self.packages += ", " + out.replace("\n", ", ")
|
||||
|
||||
|
||||
def provision_or_update(self, context: Dict = {}):
|
||||
script = [f"ynh_install_app_dependencies {self.packages}"]
|
||||
for repo, values in self.extras.items():
|
||||
|
|
Loading…
Add table
Reference in a new issue