summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-03-28 20:10:39 (GMT)
committerGuido van Rossum <guido@python.org>2000-03-28 20:10:39 (GMT)
commit84306246f1d9a70b887881e029a082aab8db9211 (patch)
tree9cd2c093c219e6e78d76b6a2d468338214cfafa8
parenta80649b357afcd4192a112a1cfdd8fe014eb573f (diff)
downloadcpython-84306246f1d9a70b887881e029a082aab8db9211.zip
cpython-84306246f1d9a70b887881e029a082aab8db9211.tar.gz
cpython-84306246f1d9a70b887881e029a082aab8db9211.tar.bz2
Fix suggested by Magnus Kessler: in class Page, it is possible for
self.parser to be None; in that case don't dereference it in getnames().
-rwxr-xr-xTools/webchecker/webchecker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/webchecker/webchecker.py b/Tools/webchecker/webchecker.py
index 5d127cb..e79e7f1 100755
--- a/Tools/webchecker/webchecker.py
+++ b/Tools/webchecker/webchecker.py
@@ -681,7 +681,10 @@ class Page:
# Method to retrieve names.
def getnames(self):
- return self.parser.names
+ if self.parser:
+ return self.parser.names
+ else:
+ return []
def getlinkinfos(self):
# File reading is done in __init__() routine. Store parser in