5c0dfb74e6
lorax uses pyanaconda's SimpleConfigParser in three different places (twice with a copy that's been dumped into pylorax, once by importing it), just to do a fairly simple job: read some values out of /etc/os-release. The only value SimpleConfigParser is adding over Python's own ConfigParser here is to read a file with no section headers, and to unquote the values. The cost is either a dependency on pyanaconda, or needing to copy the whole of simpleparser plus some other utility bits from pyanaconda into lorax. This seems like a bad trade-off. This changes the approach: we copy one very simple utility function from pyanaconda (`unquote`), and do some very simple wrapping of ConfigParser to handle reading a file without any section headers, and returning unquoted values. This way we can read what we need out of os-release without needing a dep on pyanaconda or to copy lots of things from it into pylorax. Resolves: #449 Resolves: #450 Signed-off-by: Adam Williamson <awilliam@redhat.com> |
||
---|---|---|
.. | ||
bin | ||
composer | ||
pylorax | ||
sbin |