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
commit168176ef145c81732aa1d98240955977eec547a7 (patch)
tree0031e662c48ccd529368aec1e637d2ac5d3b0aae /coverage/files.py
parentcf40fd72eb6cb7c8de48eb98f104fbef99cd780f (diff)
downloadpython-coveragepy-git-168176ef145c81732aa1d98240955977eec547a7.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 c16f113d..cce33c97 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