From 3577956c06c6c52b3876d46462b84f0c97e831c1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 2 Feb 2023 13:35:03 +0000 Subject: [PATCH] [CI] Format code with Black --- doc/generate_api_doc.py | 5 ++--- src/certificate.py | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/generate_api_doc.py b/doc/generate_api_doc.py index 514415eef..6b75f8a73 100644 --- a/doc/generate_api_doc.py +++ b/doc/generate_api_doc.py @@ -26,14 +26,13 @@ import requests def main(): - with open("../share/actionsmap.yml") as f: action_map = yaml.safe_load(f) - #try: + # try: # with open("/etc/yunohost/current_host", "r") as f: # domain = f.readline().rstrip() - #except IOError: + # except IOError: # domain = requests.get("http://ip.yunohost.org").text with open("../debian/changelog") as f: diff --git a/src/certificate.py b/src/certificate.py index c9165fa6d..a0eba212a 100644 --- a/src/certificate.py +++ b/src/certificate.py @@ -735,10 +735,9 @@ def _enable_certificate(domain, new_cert_folder): for service in ("dovecot", "metronome"): # Ugly trick to not restart metronome if it's not installed or no domain configured for XMPP - if ( - service == "metronome" - and (os.system("dpkg --list | grep -q 'ii *metronome'") != 0 - or not glob("/etc/metronome/conf.d/*.cfg.lua")) + if service == "metronome" and ( + os.system("dpkg --list | grep -q 'ii *metronome'") != 0 + or not glob("/etc/metronome/conf.d/*.cfg.lua") ): continue _run_service_command("restart", service)