Check if a certificate already exists before trying to read it

master
kaiyou 7 years ago
parent 17b0471e73
commit 70d9972584

@ -28,7 +28,7 @@ def install_certs(domain):
else: else:
print("Could not find the proper certificate from traefik") print("Could not find the proper certificate from traefik")
return return
if os.path.join(cert_path): if os.path.exists(cert_path):
with open(cert_path, "rb") as handler: with open(cert_path, "rb") as handler:
if handler.read() == cert: if handler.read() == cert:
return return

Loading…
Cancel
Save