[PATCH] replace lokkit for selinux settings (#815540)
Chris Lumens
clumens at redhat.com
Fri Jun 29 13:28:55 UTC 2012
> +class EditConfig(object):
> + """
> + Edit values in a configuration file without changing comments.
> + Supports KEY=VALUE lines and ignores everything else.
> + Does not allow adding or deleting keys.
> + Does not support duplicate key entries.
> +
> + ec = EditConfig("/path/to/file")
> + ec.values is a dict of keys from the file, edit as needed then call:
> + ec.write()
> +
> + """
Is python's ConfigParser insufficient for this purpose?
- Chris
More information about the anaconda-patches
mailing list