diff options
Diffstat (limited to '')
-rw-r--r-- | portato/gui/exception_handling.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/portato/gui/exception_handling.py b/portato/gui/exception_handling.py index a5174f5..8584dea 100644 --- a/portato/gui/exception_handling.py +++ b/portato/gui/exception_handling.py @@ -102,14 +102,16 @@ def get_version_infos(): from ..backend import system runsystem="Unknown" - if os.path.exists("/etc/gentoo-release"): - runsystem = "Gentoo" + + # check for sabayon first, as sabayon also has the gentoo release + for sp in ("/etc/sabayon-release", "/etc/sabayon-edition"): + if os.path.exists(sp): + with open(sp) as r: + runsystem = "Sabayon: %s" % r.readline().strip() + break else: - for sp in ("/etc/sabayon-release", "/etc/sabayon-edition"): - if os.path.exists(sp): - with open(sp) as r: - runsystem = "Sabayon: %s" % r.readline().strip() - break + if os.path.exists("/etc/gentoo-release"): + runsystem = "Gentoo" return "\n".join(( |