Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14755 - main/trunk/pym/portage
Date: Sat, 31 Oct 2009 19:15:57
Message-Id: E1N4JQY-0000sC-VQ@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-10-31 19:15:54 +0000 (Sat, 31 Oct 2009)
3 New Revision: 14755
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 Make cacheddir() always behave like EmptyOnError is True, since listdir()
9 doesn't handle a None return value correctly.
10
11
12 Modified: main/trunk/pym/portage/__init__.py
13 ===================================================================
14 --- main/trunk/pym/portage/__init__.py 2009-10-31 19:08:45 UTC (rev 14754)
15 +++ main/trunk/pym/portage/__init__.py 2009-10-31 19:15:54 UTC (rev 14755)
16 @@ -542,13 +542,9 @@
17 if e.errno == portage.exception.PermissionDenied.errno:
18 raise portage.exception.PermissionDenied(mypath)
19 del e
20 - if EmptyOnError:
21 - return [], []
22 - return None, None
23 + return [], []
24 except portage.exception.PortageException:
25 - if EmptyOnError:
26 - return [], []
27 - return None, None
28 + return [], []
29 # Python retuns mtime in seconds, so if it was changed in the last few seconds, it could be invalid
30 if mtime != cached_mtime or time.time() - mtime < 4:
31 if mypath in dircache:
32 @@ -615,7 +611,7 @@
33 @type ignorelist: List
34 @param followSymlinks: Follow Symlink'd files and directories
35 @type followSymlinks: Boolean
36 - @param EmptyOnError: Return [] if an error occurs.
37 + @param EmptyOnError: Return [] if an error occurs (deprecated, always True)
38 @type EmptyOnError: Boolean
39 @param dirsonly: Only return directories.
40 @type dirsonly: Boolean