From 9be0faf87c1e8eff6ed4fe9b3fe9d154aebc3c51 Mon Sep 17 00:00:00 2001 From: siddharth Date: Sat, 7 May 2022 21:23:41 -0400 Subject: acmens: update _cmd Instead of raising an exception, barf out stderr and exit. --- acmens.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/acmens.py b/acmens.py index 76cb448..78bf1a5 100644 --- a/acmens.py +++ b/acmens.py @@ -25,7 +25,7 @@ from urllib.request import urlopen from urllib.error import HTTPError -__version__ = "0.1.7" +__version__ = "0.2.0.dev" CA_PRD = "https://acme-v02.api.letsencrypt.org" CA_STG = "https://acme-staging-v02.api.letsencrypt.org" @@ -53,7 +53,8 @@ def _cmd(cmd_list, stdin=None, cmd_input=None, err_msg="Command Line Error"): ) out, err = proc.communicate(cmd_input) if proc.returncode != 0: - raise IOError("{0}\n{1}".format(err_msg, err)) + sys.stderr.write("{0}: {1}\n".format(err_msg, err.decode())) + sys.exit(1) return out -- cgit v1.2.3