diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-21 20:29:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-21 20:29:30 +0000 |
commit | b4bbc1c2fa1b58dcb4497e35b5d4436c08a054f8 (patch) | |
tree | 09204e3eeb507e2aeb727bf9a90d4e34471fbc2c | |
parent | a42108e7b69ceb3b82ab2c8497eca70c0db59040 (diff) | |
download | portage-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
-rw-r--r-- | pym/portage/process.py | 3 |
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 |