From 513b5c97673e51b0d1ea0d65241b1557a9a3c0dc Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Wed, 29 Sep 2021 21:17:00 +0200 Subject: [PATCH] [enh] #390: send_doc: Exit the programm in case of HTTPError exception got raised Exiting the programm is not an issue for all the send document cmds Even for the intermediaries tx case, since this is change operations operated over the issuer pubkey --- silkaj/network_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silkaj/network_tools.py b/silkaj/network_tools.py index 56597bd7..db122869 100644 --- a/silkaj/network_tools.py +++ b/silkaj/network_tools.py @@ -90,4 +90,4 @@ def send_document(bma_path, document): client(bma_path, document.signed_raw()) print(f"{doc_name} successfully sent") except urllib.error.HTTPError as e: - print(f"Error while publishing {doc_name.lower()}: {e}") + sys.exit(f"Error while publishing {doc_name.lower()}: {e}") -- GitLab