[sysadmin-bin] Reformat with black



commit e3cc2cc118b8df45445a7461cdd38d27374f8563
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Tue Mar 8 10:48:45 2022 +0100

    Reformat with black

 certbot/auth-hook    |  4 +++-
 certbot/cleanup-hook | 25 ++++++++++++++++++++++---
 2 files changed, 25 insertions(+), 4 deletions(-)
---
diff --git a/certbot/auth-hook b/certbot/auth-hook
index 7146011..5c7c16d 100755
--- a/certbot/auth-hook
+++ b/certbot/auth-hook
@@ -61,7 +61,9 @@ def main():
         for built_zone in os.listdir(f"{tmpdir}/built"):
             zone_name, zone_ext = os.path.splitext(built_zone)
             if zone_ext == ".signed":
-                shutil.copyfile(f"{tmpdir}/built/{built_zone}", f"/var/lib/nsd/master/{zone_name}")
+                shutil.copyfile(
+                    f"{tmpdir}/built/{built_zone}", f"/var/lib/nsd/master/{zone_name}"
+                )
 
         subprocess.run(["sudo", "/usr/sbin/nsd-control", "reload"], check=True)
         subprocess.run(["sudo", "/usr/sbin/nsd-control", "notify"], check=True)
diff --git a/certbot/cleanup-hook b/certbot/cleanup-hook
index 3a7369f..32daf1b 100755
--- a/certbot/cleanup-hook
+++ b/certbot/cleanup-hook
@@ -40,8 +40,25 @@ def main():
     base_domain = ".".join(domain.split(".")[-2:])
 
     if domain == "apps.openshift4.gnome.org":
-        subprocess.run(["oc", "-n", "openshift-ingress", "delete", "secret", "router-certs"], check=True)
-        subprocess.run(["oc", "-n", "openshift-ingress", "create", "secret", "tls", "router-certs", 
f"--cert=/srv/letsencrypt/config/live/{domain}/fullchain.pem", "--key", 
f"/srv/letsencrypt/config/live/{domain}/privkey.pem"], check=True)
+        subprocess.run(
+            ["oc", "-n", "openshift-ingress", "delete", "secret", "router-certs"],
+            check=True,
+        )
+        subprocess.run(
+            [
+                "oc",
+                "-n",
+                "openshift-ingress",
+                "create",
+                "secret",
+                "tls",
+                "router-certs",
+                f"--cert=/srv/letsencrypt/config/live/{domain}/fullchain.pem",
+                "--key",
+                f"/srv/letsencrypt/config/live/{domain}/privkey.pem",
+            ],
+            check=True,
+        )
 
     with tempfile.TemporaryDirectory() as tmpdir:
         repo = pygit2.clone_repository("/git/dns.git", tmpdir)
@@ -68,7 +85,9 @@ def main():
         for built_zone in os.listdir(f"{tmpdir}/built"):
             zone_name, zone_ext = os.path.splitext(built_zone)
             if zone_ext == ".signed":
-                shutil.copyfile(f"{tmpdir}/built/{built_zone}", f"/var/lib/nsd/master/{zone_name}")
+                shutil.copyfile(
+                    f"{tmpdir}/built/{built_zone}", f"/var/lib/nsd/master/{zone_name}"
+                )
 
         subprocess.run(["sudo", "/usr/sbin/nsd-control", "reload"], check=True)
         subprocess.run(["sudo", "/usr/sbin/nsd-control", "notify"], check=True)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]