Proper error handling
Print an error when getting obstruction map data from the dish fails, rather than crashing the script with an exception. As reported in issue #45.
This commit is contained in:
parent
e01aea6bd4
commit
8d2b25b971
1 changed files with 5 additions and 1 deletions
|
@ -25,7 +25,11 @@ LOOP_TIME_DEFAULT = 0
|
||||||
|
|
||||||
|
|
||||||
def loop_body(opts, context):
|
def loop_body(opts, context):
|
||||||
|
try:
|
||||||
snr_data = starlink_grpc.obstruction_map(context)
|
snr_data = starlink_grpc.obstruction_map(context)
|
||||||
|
except starlink_grpc.GrpcError as e:
|
||||||
|
logging.error("Failed getting obstruction map data: %s", str(e))
|
||||||
|
return 1
|
||||||
|
|
||||||
def pixel_bytes(row):
|
def pixel_bytes(row):
|
||||||
for point in row:
|
for point in row:
|
||||||
|
|
Loading…
Reference in a new issue