added a none check for original received data

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-18 16:18:47 +01:00
parent 79176e5af6
commit a797c28833
1 changed files with 19 additions and 17 deletions

View File

@ -120,7 +120,9 @@ def mqtt_publisher(ti_receiver):
artNetPacket = artNet.readPacket() artNetPacket = artNet.readPacket()
# Make sure we actually *have* a packet # Make sure we actually *have* a packet
if ti_receiver.poll(): if ti_receiver.poll():
tube_index = literal_eval(ti_receiver.recv()) ti_data = ti_receiver.recv()
if ti_data is not None:
tube_index = literal_eval(ti_data)
if artNetPacket is not None: if artNetPacket is not None:
#Checks to see if the current packet is for the specified DMX Universe #Checks to see if the current packet is for the specified DMX Universe
dmxPacket = artNetPacket.data dmxPacket = artNetPacket.data