Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Check for and print error messages from kuksa.val server
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schildt <[email protected]>
  • Loading branch information
SebastianSchildt committed Jul 8, 2021
1 parent 9e48637 commit 1ed2f4a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kuksa_feeders/dbc2val/dbcfeeder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import os, sys, signal
import configparser
import queue
import json

import dbc2vssmapper
import dbcreader
Expand Down Expand Up @@ -89,7 +90,12 @@ def terminationSignalreceived(signalNumber, frame):
tv=mapping.transform(signal,target,value)
if tv is not None: #none indicates the transform decided to not set the value
print("Update VSS path {} to {} based on signal {}".format(target, tv, signal))
kuksa.setValue(target, tv)
resp=json.loads(kuksa.setValue(target, tv))
if "error" in resp:
if "message" in resp["error"]:
print("Error setting {}: {}".format(target, resp["error"]["message"]))
else:
print("Unknown error setting {}: {}".format(target, resp))
pass
except queue.Empty:
pass
Expand Down

0 comments on commit 1ed2f4a

Please sign in to comment.