tuned icon indicating copy to clipboard operation
tuned copied to clipboard

configparser: use no strict parser to mimic old behavior

Open yarda opened this issue 3 years ago • 3 comments

Now it should allow duplicate options and sections in the INI files, the latest value is taken, the previous values are ignored, e.g.:

[selinux] avc_cache_threshold=4096 avc_cache_threshold=8192

The avc_cache_threshold will be set to the 8192.

Related: rhbz#2071418

Signed-off-by: Jaroslav Škarvada [email protected]

yarda avatar Nov 28 '22 15:11 yarda

This doesn't handle warnings in case of a duplicate. This would require extension of the ConfigParser (IMHO it is also doable).

yarda avatar Nov 28 '22 15:11 yarda

It allows duplicates in all INI files.

yarda avatar Nov 28 '22 15:11 yarda

Thank you for the PR, tested on RHEL-8.6 and Fedora 36. No warning on duplicate lines is issued, but I guess we can live with that.

jmencak avatar Nov 28 '22 16:11 jmencak

Shouldn't it be added here if we want to be consistent?

You are right, I think it should be there.

yarda avatar Jan 27 '23 00:01 yarda