Skip to content
Snippets Groups Projects
Commit 75331849 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Canonicalize distro & osfamily params in os_cls()

If the distro name as returned by libguestfs's inspect_get_distro was
redhat-based, since hyphens are not allowed in module names, importing
module redhat-based would create an ImportError exception, even if file
redhat-based.py was present. Although we don't have any redhat-based.py
module and the code will still correctly fall back to importing
linux.py this can be considered as a bug. In order to overcome this, we
replace the hyphens with underscores in the distro and osfamily names.
In the future, if we have to create a module for redhat-based distros we
will name it redhat_based.py.
parent dd489072
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment