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:
sparky8512 2022-05-25 16:30:56 -07:00
parent e01aea6bd4
commit 8d2b25b971

View file

@ -25,7 +25,11 @@ LOOP_TIME_DEFAULT = 0
def loop_body(opts, context):
snr_data = starlink_grpc.obstruction_map(context)
try:
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):
for point in row: