From f426b743ea593da9c94bf2895629d05ee2e32f50 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