summaryrefslogtreecommitdiff
path: root/Lib/linecache.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-23 13:32:20 +0000
committerGuido van Rossum <guido@python.org>1994-08-23 13:32:20 +0000
commit7aeb4b9ce85fa9d15c79bbb3c1ccf6cc31cd5e61 (patch)
tree4dc519fdd727cc179d5b884ae117871ec02695eb /Lib/linecache.py
parent9e1e149a5fbb0b24c4f3b7a2cc52e5236a715ee4 (diff)
downloadcpython-git-7aeb4b9ce85fa9d15c79bbb3c1ccf6cc31cd5e61.tar.gz
* Lib/linecache.py: don't crash on empty filename
* Lib/macpath.py: don't return trailing colon for dirname() (XXX won't do for volume names -- but otherwise glob(':*:*.py') loops forever) * Lib/traceback.py: print SyntaxError correctly * Lib/stat.py: moved to posixstat.py; added macstat.py which has the constants for the Mac; and created new stat.py which includes the right one * Lib/urllib.py: fix caching bug (by disabling the cache)
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r--Lib/linecache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py
index b981869859..f5726e9eb8 100644
--- a/Lib/linecache.py
+++ b/Lib/linecache.py
@@ -59,7 +59,7 @@ def checkcache():
def updatecache(filename):
if cache.has_key(filename):
del cache[filename]
- if filename[0] + filename[-1] == '<>':
+ if not filename or filename[0] + filename[-1] == '<>':
return []
fullname = filename
try: