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.
Projectaequitas/python-rflink
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
| 50 | 50 | ||
| 51 | 51 | # convert key=value pairs where needed | |
| 52 | 52 | for attr in filter(None, attrs.strip(DELIM).split(DELIM)): | |
| 53 | - | key, value = attr.lower().split("=") | |
| 53 | + | key, value = attr.lower().split("=", 1) | |
| 54 | 54 | if key in VALUE_TRANSLATION: | |
| 55 | 55 | value = VALUE_TRANSLATION[key](value) | |
| 56 | 56 | name = PACKET_FIELDS.get(key, key) |
The check that tells the two apart
fail→pass·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.