File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2860,9 +2860,14 @@ async def parse_packet(self, data: bytes):
2860
2860
calc_chksum = self .first_83_packet_checksum
2861
2861
else :
2862
2862
self .first_83_packet_checksum = None
2863
-
2864
- if calc_chksum != checksum :
2865
- logger .warning (f"{ bad_chksum_msg } \n \n HEX: { packet_data [1 :- 1 ].hex (' ' )} \n INT: { bytes2list (packet_data [1 :- 1 ])} " )
2863
+ # no clue how this is supposedly an unbound var with no value when it is clearly not
2864
+ # wrap it in try and follow the traceback
2865
+ try :
2866
+ if calc_chksum != checksum :
2867
+ logger .warning (f"{ bad_chksum_msg } \n \n HEX: { packet_data [1 :- 1 ].hex (' ' )} \n INT: { bytes2list (packet_data [1 :- 1 ])} " )
2868
+ except Exception as e :
2869
+ logger .exception (f"\n \n \n DEBUG>>> { e } \n \n " )
2870
+ logger .warning (f"HEX: { packet_data [1 :- 1 ].hex (' ' )} \n INT: { bytes2list (packet_data [1 :- 1 ])} " )
2866
2871
2867
2872
2868
2873
id_idx = 14 if add_one is False else 15
You can’t perform that action at this time.
0 commit comments