diff options
author | Guido van Rossum <guido@python.org> | 2000-03-28 20:10:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-03-28 20:10:39 (GMT) |
commit | 84306246f1d9a70b887881e029a082aab8db9211 (patch) | |
tree | 9cd2c093c219e6e78d76b6a2d468338214cfafa8 /Tools/webchecker | |
parent | a80649b357afcd4192a112a1cfdd8fe014eb573f (diff) | |
download | cpython-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().
Diffstat (limited to 'Tools/webchecker')
-rwxr-xr-x | Tools/webchecker/webchecker.py | 5 |
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 |