added exception

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-20 16:11:59 +01:00
parent 50d07e2e15
commit ebadb68c18
1 changed files with 2 additions and 4 deletions

View File

@ -123,17 +123,15 @@ def mqtt_publisher(ti_queue):
end = time.time() end = time.time()
print("Receiving of tube index took: "+str(end-start)) print("Receiving of tube index took: "+str(end-start))
tube_index_old = tube_index tube_index_old = tube_index
except: except Exception as e:
print(e)
if tube_index_old is not None: if tube_index_old is not None:
tube_index = tube_index_old tube_index = tube_index_old
else: else:
tube_index = None tube_index = None
# Gets whatever the last Art-Net packet we received is # Gets whatever the last Art-Net packet we received is
start = time.time()
artNetPacket = artNet.readPacket() artNetPacket = artNet.readPacket()
# Make sure we actually *have* a packet # Make sure we actually *have* a packet
end = time.time()
print("Receiving of artnet packet took: "+str(end-start))
if artNetPacket is not None: if artNetPacket is not None:
if tube_index is not None: if tube_index is not None:
for index_row in tube_index: for index_row in tube_index: