One function

decode_packet in aequitas/python-rflink

The author described this change as Fix commands which contain '='.. It counts as a record because the check below fails on the code as it stood at 1b2ea3d82 and passes on d114dc22d, with nothing else changed between the two runs.

Fix saved2020-01-25
Sharing licenceMIT · LICENCE
Change size+1 1

What the code was meant to do, written into the code itself as a docstring

Break packet down into primitives, and do basic interpretation. True

The change

5050
5151 # convert key=value pairs where needed
5252 for attr in filter(None, attrs.strip(DELIM).split(DELIM)):
53- key, value = attr.lower().split("=")
53+ key, value = attr.lower().split("=", 1)
5454 if key in VALUE_TRANSLATION:
5555 value = VALUE_TRANSLATION[key](value)
5656 name = PACKET_FIELDS.get(key, key)

The check that tells the two apart

failpass·tests/test_parse.py::test_packet_parsing[20;9A;FA500;ID=0000db9e;SWITCH=01;CMD=SET_LEVEL=2;-expect15]

Check file tests/test_parse.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it1b2ea3d82e4138fb5b35c763df94aa0a63d24acf
Broken version dated2019-12-28
Modulerflink.parser
Units changeddecode_packet
Fingerprint76a0652ac47c9780
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.