only print status if ok 89/7389/2
authordemx8as6 <martin.skorupski@highstreet-technologies.com>
Wed, 15 Dec 2021 16:49:37 +0000 (17:49 +0100)
committerMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Wed, 15 Dec 2021 16:54:50 +0000 (16:54 +0000)
- small correction

IssueID: OAM-242
Change-Id: I9977c5901c6b25ad39197f406af44a079f6fb32a
Signed-off-by: demx8as6 <martin.skorupski@highstreet-technologies.com>
solution/dev/client-scripts-ves-v7/globalVesEventEmitter.py

index 9f44a5c..26c3879 100644 (file)
@@ -44,11 +44,12 @@ def sendVesEvent(data):
     except requests.exceptions.RequestException as e:
       # catastrophic error. bail.
       raise SystemExit(e)
-        
-    if response.status_code >= 200 and response.status_code <= 500:
+
+    if response.status_code >= 200 and response.status_code <= 300:
       print(response)
     else:
-      sys.exit('Reading VES "stndDefined" message template failed.')
+      print(response.status_code)
+      sys.exit('Sending VES "stndDefined" message template failed with code %d.' % response.status_code)
 
 def sendHttpGet(url):
     try:
@@ -60,7 +61,7 @@ def sendHttpGet(url):
     except requests.exceptions.RequestException as e:
       # catastrophic error. bail.
       raise SystemExit(e)
-        
+
     if response.status_code >= 200 and response.status_code < 300:
       return response.json()
     else: