summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/linecache.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py
index f49695a..4838625 100644
--- a/Lib/linecache.py
+++ b/Lib/linecache.py
@@ -94,6 +94,10 @@ def updatecache(filename, module_globals=None):
except (ImportError, IOError):
pass
else:
+ if data is None:
+ # No luck, the PEP302 loader cannot find the source
+ # for this module.
+ return []
cache[filename] = (
len(data), None,
[line+'\n' for line in data.splitlines()], fullname