summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-31 07:56:28 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-31 07:56:28 +0000
commit0d753685a838e7f302146bf8c5aff54e76908435 (patch)
treed0445a6942607906aa931f9984e02abb128c277d
parent7ffe8c4e44bc5b25f447b87abc7a296cc30a3885 (diff)
downloadportage-0d753685a838e7f302146bf8c5aff54e76908435.tar.gz
portage-0d753685a838e7f302146bf8c5aff54e76908435.tar.bz2
portage-0d753685a838e7f302146bf8c5aff54e76908435.zip
Bug #283292 - Fix FindPortdir() to prevent OSError: [Errno 2] from stat when
$PWD is unset. Thanks to Jonathan Callen <en.ABCD@gmail.com> for this patch. svn path=/main/trunk/; revision=14174
-rw-r--r--pym/repoman/utilities.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index cf32399d3..c3665d9d8 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -346,7 +346,7 @@ def FindPortdir(settings):
portdir_overlay = None
location = os.getcwd()
pwd = os.environ.get('PWD', '')
- if pwd != location and os.path.realpath(pwd) == location:
+ if pwd and pwd != location and os.path.realpath(pwd) == location:
# getcwd() returns the canonical path but that makes it hard for repoman to
# orient itself if the user has symlinks in their portage tree structure.
# We use os.environ["PWD"], if available, to get the non-canonical path of