From: Zac Medico Date: Mon, 21 Sep 2009 20:29:30 +0000 (-0000) Subject: Make find_binary() use os.environ.get instead of os.getenv, since os.getenv X-Git-Tag: v2.2_rc42~60 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b4bbc1c2fa1b58dcb4497e35b5d4436c08a054f8;p=portage.git 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 --- 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