diff options
author | Wolfgang Müller | 2021-07-27 12:20:03 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-11-27 14:05:19 +0100 |
commit | 743db7dd1c0ced6d4aeb4d4719e4985e8f83890b (patch) | |
tree | d7e67f56053120e30b9f4cc7b89cb63590b586ae /weltschmerz.desktop.in | |
parent | 84e59cbd782875a8ec0e2ca40fd1b086ca4ac64d (diff) | |
download | weltschmerz-743db7dd1c0ced6d4aeb4d4719e4985e8f83890b.tar.gz |
Clarify warning on duplicate keys
In order to alert the user to any potential errors in the configuration
files, we keep track of configuration entries that we have not accessed
and print them out. These might include misspellings or otherwise
malformed strings.
To collect those unparsed configuration entries, we remove the ones that
have been successfully parsed from our in-memory KeyFile. The remaining
keys are the offending ones. Unfortunately, because KeyFile.remove_key()
removes only one matching key, we might also be left with any duplicates
that would otherwise be valid entries.
So, if the entry misc.font is specified twice, we currently warn about
an "unknown" key, the second misc.font entry. This could potentially be
misleading to the user.
Since it is too expensive to fix this issue in the code, make sure we
warn instead about "unknown or duplicate" keys. This way we say the
correct thing without incurring a big complexity cost.
Diffstat (limited to 'weltschmerz.desktop.in')
0 files changed, 0 insertions, 0 deletions