1 |
Author: zmedico |
2 |
Date: 2009-10-31 19:44:18 +0000 (Sat, 31 Oct 2009) |
3 |
New Revision: 14759 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.7/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. (trunk r14755) |
10 |
|
11 |
Modified: main/branches/2.1.7/pym/portage/__init__.py |
12 |
=================================================================== |
13 |
--- main/branches/2.1.7/pym/portage/__init__.py 2009-10-31 19:44:04 UTC (rev 14758) |
14 |
+++ main/branches/2.1.7/pym/portage/__init__.py 2009-10-31 19:44:18 UTC (rev 14759) |
15 |
@@ -542,13 +542,9 @@ |
16 |
if e.errno == portage.exception.PermissionDenied.errno: |
17 |
raise portage.exception.PermissionDenied(mypath) |
18 |
del e |
19 |
- if EmptyOnError: |
20 |
- return [], [] |
21 |
- return None, None |
22 |
+ return [], [] |
23 |
except portage.exception.PortageException: |
24 |
- if EmptyOnError: |
25 |
- return [], [] |
26 |
- return None, None |
27 |
+ return [], [] |
28 |
# Python retuns mtime in seconds, so if it was changed in the last few seconds, it could be invalid |
29 |
if mtime != cached_mtime or time.time() - mtime < 4: |
30 |
if mypath in dircache: |
31 |
@@ -615,7 +611,7 @@ |
32 |
@type ignorelist: List |
33 |
@param followSymlinks: Follow Symlink'd files and directories |
34 |
@type followSymlinks: Boolean |
35 |
- @param EmptyOnError: Return [] if an error occurs. |
36 |
+ @param EmptyOnError: Return [] if an error occurs (deprecated, always True) |
37 |
@type EmptyOnError: Boolean |
38 |
@param dirsonly: Only return directories. |
39 |
@type dirsonly: Boolean |