diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-03 01:04:36 +0000 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-03 01:04:36 +0000 |
commit | 4250e6969b807bec849d9c9078ec5206333ac339 (patch) | |
tree | 42225879ae6d2c65478c24fb604465f7bd778853 /portato | |
parent | 3d248edb873d90f77798a31a5287f947b9579913 (diff) | |
download | portato-4250e6969b807bec849d9c9078ec5206333ac339.tar.gz portato-4250e6969b807bec849d9c9078ec5206333ac339.tar.bz2 portato-4250e6969b807bec849d9c9078ec5206333ac339.zip |
Return correct system result on Sabayon
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(( |