public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r14755 - main/trunk/pym/portage
@ 2009-10-31 19:15 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-10-31 19:15 UTC (permalink / raw
  To: gentoo-commits

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
===================================================================
--- 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 == 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 != 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 True)
 	@type EmptyOnError: Boolean
 	@param dirsonly: Only return directories.
 	@type dirsonly: Boolean




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-31 19:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-31 19:15 [gentoo-commits] portage r14755 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox