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
41c9d9d8e3
commit
6210d07c24
2 changed files with 8 additions and 3 deletions
|
@ -775,7 +775,7 @@ def _tail(file, n):
|
||||||
f = gzip.open(file)
|
f = gzip.open(file)
|
||||||
lines = f.read().splitlines()
|
lines = f.read().splitlines()
|
||||||
else:
|
else:
|
||||||
f = open(file, errors='replace')
|
f = open(file, errors="replace")
|
||||||
pos = 1
|
pos = 1
|
||||||
lines = []
|
lines = []
|
||||||
while len(lines) < to_read and pos > 0:
|
while len(lines) < to_read and pos > 0:
|
||||||
|
|
|
@ -339,8 +339,13 @@ class PermissionsResource(AppResource):
|
||||||
|
|
||||||
for perm, infos in self.permissions.items():
|
for perm, infos in self.permissions.items():
|
||||||
if "__DOMAIN__" in infos.get("url", ""):
|
if "__DOMAIN__" in infos.get("url", ""):
|
||||||
infos["url"] = infos["url"].replace("__DOMAIN__", self.get_setting("domain"))
|
infos["url"] = infos["url"].replace(
|
||||||
infos["additional_urls"] = [u.replace("__DOMAIN__", self.get_setting("domain")) for u in infos.get("additional_urls")]
|
"__DOMAIN__", self.get_setting("domain")
|
||||||
|
)
|
||||||
|
infos["additional_urls"] = [
|
||||||
|
u.replace("__DOMAIN__", self.get_setting("domain"))
|
||||||
|
for u in infos.get("additional_urls")
|
||||||
|
]
|
||||||
|
|
||||||
def provision_or_update(self, context: Dict = {}):
|
def provision_or_update(self, context: Dict = {}):
|
||||||
from yunohost.permission import (
|
from yunohost.permission import (
|
||||||
|
|
Loading…
Add table
Reference in a new issue