From: Zac Medico Date: Mon, 4 Dec 2006 10:07:35 +0000 (-0000) Subject: Use portage.chdir() instead of os.chdir() in order to avoid an 'OSError: [Errno 2... X-Git-Tag: v2.1.2~400 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6eb1ca2326c2021f4106b6a39e784b968746a9a6;p=portage.git Use portage.chdir() instead of os.chdir() in order to avoid an 'OSError: [Errno 2] No such file or directory' if the working directory doesn't exist. Thanks to Caster for reporting. svn path=/main/trunk/; revision=5171 --- diff --git a/pym/portage.py b/pym/portage.py index dbfe5605b..5b0e9fb35 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6554,7 +6554,7 @@ class dblink: myfilelist = listdir(srcroot, recursive=1, filesonly=1, followSymlinks=False) # the linkcheck only works if we are in srcroot - mycwd = os.getcwd() + mycwd = getcwd() os.chdir(srcroot) mysymlinks = filter(os.path.islink, listdir(srcroot, recursive=1, filesonly=0, followSymlinks=False)) myfilelist.extend(mysymlinks)