From b4bbc1c2fa1b58dcb4497e35b5d4436c08a054f8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 21 Sep 2009 20:29:30 +0000 Subject: [PATCH] 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 --- pym/portage/process.py | 3 +-- 1 file changed, 1 insertion(+), 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 -- 2.26.2