diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/__init__.py | 3 | ||||
-rw-r--r-- | pym/portage/data.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 3423ec241..051d6dd4a 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -29,6 +29,7 @@ try: from random import shuffle import UserDict from itertools import chain, izip + import platform except ImportError, e: sys.stderr.write("\n\n") sys.stderr.write("!!! Failed to complete python imports. These are internal modules for\n") @@ -41,7 +42,7 @@ except ImportError, e: raise bsd_chflags = None -if os.uname()[0] in ["FreeBSD"]: +if platform.system() in ["FreeBSD"]: def bsd_chflags(): pass def _chflags(path, flags, opts=""): diff --git a/pym/portage/data.py b/pym/portage/data.py index 5fc811e43..5f4d05630 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -3,13 +3,13 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -import os, sys, pwd, grp +import os, sys, pwd, grp, platform from portage.util import writemsg from portage.output import green,red from portage.output import create_color_func bad = create_color_func("BAD") -ostype=os.uname()[0] +ostype=platform.system() userland = None if ostype == "DragonFly" or ostype.endswith("BSD"): userland = "BSD" |