From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1N4JQa-0000My-Sg for garchives@archives.gentoo.org; Sat, 31 Oct 2009 19:15:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1468BE0973; Sat, 31 Oct 2009 19:15:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E89C3E0973 for ; Sat, 31 Oct 2009 19:15:55 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 94BBC64FBF for ; Sat, 31 Oct 2009 19:15:55 +0000 (UTC) Received: from zmedico by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1N4JQY-0000sC-VQ for gentoo-commits@lists.gentoo.org; Sat, 31 Oct 2009 19:15:55 +0000 To: gentoo-commits@lists.gentoo.org From: "Zac Medico (zmedico)" Subject: [gentoo-commits] portage r14755 - main/trunk/pym/portage X-VCS-Repository: portage X-VCS-Revision: 14755 X-VCS-Files: main/trunk/pym/portage/__init__.py X-VCS-Directories: main/trunk/pym/portage X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico Content-Type: text/plain; charset=UTF-8 Message-Id: Sender: Zac Medico Date: Sat, 31 Oct 2009 19:15:54 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0ee4e9fe-e42d-49fb-9081-dd670396c0f7 X-Archives-Hash: 8507397fc56d006c9d82a81671db05d9 Author: zmedico Date: 2009-10-31 19:15:54 +0000 (Sat, 31 Oct 2009) New Revision: 14755 Modified: main/trunk/pym/portage/__init__.py Log: Make cacheddir() always behave like EmptyOnError is True, since listdir() doesn't handle a None return value correctly. Modified: main/trunk/pym/portage/__init__.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- main/trunk/pym/portage/__init__.py 2009-10-31 19:08:45 UTC (rev 14754= ) +++ main/trunk/pym/portage/__init__.py 2009-10-31 19:15:54 UTC (rev 14755= ) @@ -542,13 +542,9 @@ if e.errno =3D=3D portage.exception.PermissionDenied.errno: raise portage.exception.PermissionDenied(mypath) del e - if EmptyOnError: - return [], [] - return None, None + return [], [] except portage.exception.PortageException: - if EmptyOnError: - return [], [] - return None, None + return [], [] # Python retuns mtime in seconds, so if it was changed in the last few = seconds, it could be invalid if mtime !=3D cached_mtime or time.time() - mtime < 4: if mypath in dircache: @@ -615,7 +611,7 @@ @type ignorelist: List @param followSymlinks: Follow Symlink'd files and directories @type followSymlinks: Boolean - @param EmptyOnError: Return [] if an error occurs. + @param EmptyOnError: Return [] if an error occurs (deprecated, always T= rue) @type EmptyOnError: Boolean @param dirsonly: Only return directories. @type dirsonly: Boolean