summaryrefslogtreecommitdiff
path: root/coverage/files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-29 22:21:48 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-29 22:21:48 -0400
commitc7f90f9e930835a955df59bffe96e996dfcf11a0 (patch)
treeab7392478c60177f4912c40e9febae1e517ff3c6 /coverage/files.py
parentc1d4f46e580ee4eab17c527f94a01e825a496e42 (diff)
downloadpython-coveragepy-c7f90f9e930835a955df59bffe96e996dfcf11a0.tar.gz
Working toward reading source from eggs, but this isn't right on Py3k yet.
Diffstat (limited to 'coverage/files.py')
-rw-r--r--coverage/files.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/coverage/files.py b/coverage/files.py
index c16f113..cce33c9 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -34,7 +34,7 @@ class FileLocator:
if filename not in self.canonical_filename_cache:
f = filename
if os.path.isabs(f) and not os.path.exists(f):
- if not self.get_zip_data(f):
+ if self.get_zip_data(f) is None:
f = os.path.basename(f)
if not os.path.isabs(f):
for path in [os.curdir] + sys.path:
@@ -50,7 +50,8 @@ class FileLocator:
"""Get data from `filename` if it is a zip file path.
Returns the data read from the zip file, or None if no zip file could
- be found or `filename` isn't in it.
+ be found or `filename` isn't in it. The data returned might be "" if
+ the file is empty.
"""
import zipimport