From 8c4ea69165e564427c8c3ea4cd159ca41d6261d4 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Sun, 14 Jun 2020 23:14:52 +0200 Subject: [PATCH] Version 3.4.0 --- CHANGELOG.md | 2 ++ pyproject.toml | 2 +- src/dnsrobocert/core/hooks.py | 19 +++++++++++-------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd832de2..49c2d81e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## master - CURRENT + +## 3.4.0 - 14/06/2020 ### Added * DNS challenges are now all run before any wait or check happens. This is useful for certificates that contains lot of domains, because DNSroboCert will wait only once the provided `sleep_time`, instead diff --git a/pyproject.toml b/pyproject.toml index 94ef0056..de75fca3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "poetry.masonry.api" [tool.poetry] name = "dnsrobocert" -version = "3.3.4" +version = "3.4.0" description = "A tool to manage your DNS-challenged TLS certificates" license = "MIT" keywords = [ diff --git a/src/dnsrobocert/core/hooks.py b/src/dnsrobocert/core/hooks.py index 46dcc1ba..e6e87fd3 100644 --- a/src/dnsrobocert/core/hooks.py +++ b/src/dnsrobocert/core/hooks.py @@ -35,14 +35,18 @@ def main(args: List[str] = None) -> int: print( "Error occured while loading the configuration file, aborting the `{0}` hook.".format( parsed_args.type - ), file=sys.stderr + ), + file=sys.stderr, ) return 1 try: globals()[parsed_args.type](dnsrobocert_config, parsed_args.lineage) except BaseException as e: - print("Error while executing the `{0}` hook:".format(parsed_args.type), file=sys.stderr) + print( + "Error while executing the `{0}` hook:".format(parsed_args.type), + file=sys.stderr, + ) print(e, file=sys.stderr) traceback.print_exc(file=sys.stderr) return 1 @@ -55,7 +59,7 @@ def auth(dnsrobocert_config: Dict[str, Any], lineage: str): domain = os.environ["CERTBOT_DOMAIN"] token = os.environ["CERTBOT_VALIDATION"] - print('Executing auth hook for domain {0}, lineage {1}.'.format(domain, lineage)) + print("Executing auth hook for domain {0}, lineage {1}.".format(domain, lineage)) _txt_challenge(profile, token, domain, action="create") @@ -85,7 +89,8 @@ def auth(dnsrobocert_config: Dict[str, Any], lineage: str): print( "All challenges were not propagated after the maximum tries of {0}".format( max_checks - ), file=sys.stderr + ), + file=sys.stderr, ) raise RuntimeError("Auth hook failed.") @@ -140,9 +145,7 @@ def _check_one_challenge(challenge: str, token: Optional[str]) -> bool: ] if not validation_answers: - print( - "TXT {0} does not have the expected token value.".format(challenge) - ) + print("TXT {0} does not have the expected token value.".format(challenge)) return False print("TXT {0} has the expected token value.") @@ -155,7 +158,7 @@ def cleanup(dnsrobocert_config: Dict[str, str], lineage: str): domain = os.environ["CERTBOT_DOMAIN"] token = os.environ["CERTBOT_VALIDATION"] - print('Executing cleanup hook for domain {0}, lineage {1}.'.format(domain, lineage)) + print("Executing cleanup hook for domain {0}, lineage {1}.".format(domain, lineage)) _txt_challenge(profile, token, domain, action="delete")