summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage_data.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pym/portage_data.py b/pym/portage_data.py
index 760ab3ea2..bd556b519 100644
--- a/pym/portage_data.py
+++ b/pym/portage_data.py
@@ -31,11 +31,14 @@ if not lchown:
# Included in python-2.3
lchown = os.lchown
else:
- import missingos
- lchown = missingos.lchown
+ try:
+ import missingos
+ lchown = missingos.lchown
+ except ImportError:
+ def lchown(*pos_args, **key_args):
+ writemsg(red("!!!") + " It seems that os.lchown does not" + \
+ " exist. Please rebuild python.\n", noiselevel=-1)
-
-
os.environ["USERLAND"]=userland
# Portage has 3 security levels that depend on the uid and gid of the main