summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2022-05-07 21:23:41 -0400
committersiddharth <s@ricketyspace.net>2022-05-07 21:23:41 -0400
commit9be0faf87c1e8eff6ed4fe9b3fe9d154aebc3c51 (patch)
tree1b0314673c6fd6e3343e273fb479a2137af0e647
parent0b92f24dd880db86e9d8e73669de0cf46e40e6fa (diff)
acmens: update _cmd
Instead of raising an exception, barf out stderr and exit.
-rw-r--r--acmens.py5
1 files 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