One function

_process in kellyjonbrazil/jc

The author described this change as Fix ifconfig hex mask conversion using lstrip('0x') instead of [2:]. It counts as a record because the check below fails on the code as it stood at 585ff83a2 and passes on 2f9377cb6, with nothing else changed between the two runs.

Fix saved2026-03-25
Sharing licenceMIT · LICENSE.md
Change size+2 2

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

Final processing to conform to the schema. Parameters: proc_data: (List of Dictionaries) raw structured data to process Returns: List of Dictionaries. Structured to conform to the schema.

The change

2727 try:
2828 if entry['ipv4_mask'].startswith('0x'):
2929 new_mask = entry['ipv4_mask']
30- new_mask = new_mask.lstrip('0x')
30+ new_mask = new_mask[2:]
3131 new_mask = '.'.join(str(int(i, 16)) for i in [new_mask[i:i + 2] for i in range(0, len(new_mask), 2)])
3232 entry['ipv4_mask'] = new_mask
3333 except (ValueError, TypeError, AttributeError):
5252 try:
5353 if ip_address['mask'].startswith('0x'):
5454 new_mask = ip_address['mask']
55- new_mask = new_mask.lstrip('0x')
55+ new_mask = new_mask[2:]
5656 new_mask = '.'.join(str(int(i, 16)) for i in [new_mask[i:i + 2] for i in range(0, len(new_mask), 2)])
5757 ip_address['mask'] = new_mask
5858 except (ValueError, TypeError, AttributeError):

The check that tells the two apart

failpass·tests/test_ifconfig.py::MyTests::test_ifconfig_hex_mask_all_zeros

Check file tests/test_ifconfig.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 it585ff83a2e97f58427df10a04f699603ebc065a0
Broken version dated2026-03-16
Modulejc.parsers.ifconfig
Units changed_process
Fingerprint341f264a0cdd152f
Checked2026-08-18 by goldset/0.1

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

Other bugs found in kellyjonbrazil/jc