From 4250e6969b807bec849d9c9078ec5206333ac339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Tue, 3 Feb 2009 01:04:36 +0000 Subject: Return correct system result on Sabayon --- portato/gui/exception_handling.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'portato/gui/exception_handling.py') 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(( -- cgit v1.2.3