From c7f90f9e930835a955df59bffe96e996dfcf11a0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 29 Sep 2009 22:21:48 -0400 Subject: Working toward reading source from eggs, but this isn't right on Py3k yet. --- coverage/files.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'coverage/files.py') 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 -- cgit v1.2.1