[CI] Format code with Black

This commit is contained in:
yunohost-bot 2023-02-02 13:35:03 +00:00
parent 0826a54189
commit 3577956c06
2 changed files with 5 additions and 7 deletions

View file

@ -26,14 +26,13 @@ import requests
def main(): def main():
with open("../share/actionsmap.yml") as f: with open("../share/actionsmap.yml") as f:
action_map = yaml.safe_load(f) action_map = yaml.safe_load(f)
#try: # try:
# with open("/etc/yunohost/current_host", "r") as f: # with open("/etc/yunohost/current_host", "r") as f:
# domain = f.readline().rstrip() # domain = f.readline().rstrip()
#except IOError: # except IOError:
# domain = requests.get("http://ip.yunohost.org").text # domain = requests.get("http://ip.yunohost.org").text
with open("../debian/changelog") as f: with open("../debian/changelog") as f:

View file

@ -735,10 +735,9 @@ def _enable_certificate(domain, new_cert_folder):
for service in ("dovecot", "metronome"): for service in ("dovecot", "metronome"):
# Ugly trick to not restart metronome if it's not installed or no domain configured for XMPP # Ugly trick to not restart metronome if it's not installed or no domain configured for XMPP
if ( if service == "metronome" and (
service == "metronome" os.system("dpkg --list | grep -q 'ii *metronome'") != 0
and (os.system("dpkg --list | grep -q 'ii *metronome'") != 0 or not glob("/etc/metronome/conf.d/*.cfg.lua")
or not glob("/etc/metronome/conf.d/*.cfg.lua"))
): ):
continue continue
_run_service_command("restart", service) _run_service_command("restart", service)