diff options
author | siddharth <s@ricketyspace.net> | 2022-05-07 21:23:41 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2022-05-07 21:23:41 -0400 |
commit | 9be0faf87c1e8eff6ed4fe9b3fe9d154aebc3c51 (patch) | |
tree | 1b0314673c6fd6e3343e273fb479a2137af0e647 | |
parent | 0b92f24dd880db86e9d8e73669de0cf46e40e6fa (diff) |
acmens: update _cmd
Instead of raising an exception, barf out stderr and exit.
-rw-r--r-- | acmens.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |