From 3cb95ccf5f9a591865fde254ab54b09fba65f2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Br=C3=BCckner?= Date: Sun, 5 Aug 2018 00:58:32 +0200 Subject: [PATCH] bugfixes --- extractor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extractor.py b/extractor.py index 274c2a0..8549532 100644 --- a/extractor.py +++ b/extractor.py @@ -81,7 +81,7 @@ def restartContainerWithDomains(domains): restartDomains = str.split(c.labels["com.github.SnowMB.traefik-certificate-extractor.restart_domain"], ',') if not set(domains).isdisjoint(restartDomains): print('restarting container ' + c.id) -# c.restart() + c.restart() def createCerts(args): @@ -111,8 +111,8 @@ def createCerts(args): privatekey = c['Key'] fullchain = c['Certificate'] sans = c['Domain']['SANs'] - - if (len(args.include)>0 and name not in args.include) or (len(args.exclude)>0 and name in args.exclude): + + if (args.include and name not in args.include) or (args.exclude and name in args.exclude): continue # Decode private key, certificate and chain @@ -145,7 +145,7 @@ def createCerts(args): with (directory / name + '.chain.pem').open('w') as f: f.write(chain) else: - directory = args.directory / name + directory = directory / name if not directory.exists(): directory.mkdir()