summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-04 21:32:29 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-04 21:32:29 +0000
commit30155313812d97c8daf59faa7f68d5639f9d06ad (patch)
tree03f8dca633f255d27c46daa464f0029cfd449223
parentd08b6f1567b7b556b4e6fdac6c5e1f3f05aacaa5 (diff)
downloadportage-30155313812d97c8daf59faa7f68d5639f9d06ad.tar.gz
portage-30155313812d97c8daf59faa7f68d5639f9d06ad.tar.bz2
portage-30155313812d97c8daf59faa7f68d5639f9d06ad.zip
Handle AttributeError in case os.getloadavg does not exist, like when python
is built agains uclibc. svn path=/main/trunk/; revision=11621
-rw-r--r--pym/_emerge/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 96f3c2aa9..60940e82c 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -8395,7 +8395,7 @@ class PollScheduler(object):
self._running_job_count() > 1:
try:
avg1, avg5, avg15 = os.getloadavg()
- except OSError, e:
+ except (AttributeError, OSError), e:
writemsg("!!! getloadavg() failed: %s\n" % (e,),
noiselevel=-1)
del e
@@ -8778,7 +8778,7 @@ class JobStatusDisplay(object):
def _load_avg_str(self):
try:
avg = os.getloadavg()
- except OSError, e:
+ except (AttributeError, OSError), e:
return str(e)
max_avg = max(avg)