From e7d36475d3b0c32b033f79c7ed16c97368f82519 Mon Sep 17 00:00:00 2001
From: Massimiliano Adamo <maxadamo@gmail.com>
Date: Thu, 10 Sep 2020 18:29:55 +0200
Subject: [PATCH] minor

---
 files/cert2json.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/files/cert2json.py b/files/cert2json.py
index 2c72c9a..b17f656 100755
--- a/files/cert2json.py
+++ b/files/cert2json.py
@@ -20,13 +20,7 @@ from docopt import docopt
 
 ARGS = docopt(__doc__)
 PROVIDER = ARGS['--provider']
-if PROVIDER == "letsencrypt":
-    PROVIDER_STRING = 'LetsEncrypt'
-elif PROVIDER == "sectigo_ov":
-    PROVIDER_STRING = 'SectiGO OV'
-elif PROVIDER == "sectigo_ev":
-    PROVIDER_STRING = 'SectiGO EV'
-else:
+if PROVIDER not in ["letsencrypt", "sectigo_ov", "sectigo_ev"]:
     print("valid providers are: sectigo_ev, sectigo_ov and letsencrypt")
     sys.exit()
 
@@ -41,7 +35,7 @@ JSON_FILE = "/etc/acme/{}.json".format(PROVIDER)
 
 
 with open(YAML_FILE, "w") as yaml_out:
-    yaml_out.write("{} Certificates:\n".format(PROVIDER_STRING))
+    yaml_out.write("---\n".format(PROVIDER_STRING))
     for txt_line in DECODED_OUTPUT:
         if "Certificate Name:" in txt_line:
             txt_line_out = re.sub('.*Certificate Name: ', '  ', txt_line) + ":"
-- 
GitLab