Whole file

jwodder/javaproperties

The author described this change as Fix the handling of empty XML tags. It counts as a record because the check below fails on the code as it stood at c54b3bb7a and passes on cb9f9e518, with nothing else changed between the two runs.

Fix saved2020-11-28
Sharing licenceMIT · LICENSE
Change size+1 1

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

Fix the handling of empty XML tags

The change

6868 key = entry.get('key')
6969 if key is None:
7070 raise ValueError('<entry> is missing "key" attribute')
71- yield (key, entry.text)
71+ yield (key, entry.text or '')
7272
7373 def dump_xml(props, fp, comment=None, encoding='UTF-8', sort_keys=False):
7474 """

The check that tells the two apart

failpass·test/test_loads_xml.py::test_loads_xml[<properties><entry

Check file test/test_loads_xml.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 itc54b3bb7ae93d0926e250a167b546a3119518b7d
Broken version dated2020-11-27
Modulejavaproperties.xmlprops
Units changed_fromXML
Fingerprint57152256c5159d0d
Checked2026-08-18 by goldset/0.1

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