1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-11-25 22:12:28 +02:00

Check if a certificate already exists before trying to read it

This commit is contained in:
kaiyou
2017-09-10 21:05:54 +02:00
parent 17b0471e73
commit 70d9972584

View File

@@ -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