summaryrefslogtreecommitdiffstats
path: root/pym/portage/process.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-21 20:29:30 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-21 20:29:30 +0000
commitb4bbc1c2fa1b58dcb4497e35b5d4436c08a054f8 (patch)
tree09204e3eeb507e2aeb727bf9a90d4e34471fbc2c /pym/portage/process.py
parenta42108e7b69ceb3b82ab2c8497eca70c0db59040 (diff)
downloadportage-b4bbc1c2fa1b58dcb4497e35b5d4436c08a054f8.tar.gz
portage-b4bbc1c2fa1b58dcb4497e35b5d4436c08a054f8.tar.bz2
portage-b4bbc1c2fa1b58dcb4497e35b5d4436c08a054f8.zip
Make find_binary() use os.environ.get instead of os.getenv, since os.getenv
isn't behaving correctly in py3k (maybe a unicode wrapper issue?). svn path=/main/trunk/; revision=14364
Diffstat (limited to 'pym/portage/process.py')
-rw-r--r--pym/portage/process.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index 68c523a09..e7f09cd2d 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -386,8 +386,7 @@ def find_binary(binary):
@rtype: None or string
@returns: full path to binary or None if the binary could not be located.
"""
-
- for path in os.getenv("PATH", "").split(":"):
+ for path in os.environ.get("PATH", "").split(":"):
filename = "%s/%s" % (path, binary)
if os.access(filename, os.X_OK) and os.path.isfile(filename):
return filename