Skip to content

Commit

Permalink
removed bogus cleanup attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
engineerjoe440 committed Dec 17, 2023
1 parent e244709 commit 6cafe7d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions selprotopy/protocol/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ def _cast_bytearray(data: AnyStr, debug: bool = True):
byte_array = byte_array.split(commands.LEVEL_0)[0]
if byte_array.endswith(commands.CR):
byte_array = byte_array[:-2]
# Attempt to Reconcile Invalid Length by Comparing with Expected Message Len
if len(byte_array) > byte_array[byte_array[2] - 1]:
byte_array = byte_array.replace(b'\xff\xff', b'\xff')
_validate_checksum( byte_array=byte_array )
return byte_array

Expand Down

0 comments on commit 6cafe7d

Please sign in to comment.