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().
This commit is contained in:
Guido van Rossum 2000-03-28 20:10:39 +00:00
parent a80649b357
commit 84306246f1
1 changed files with 4 additions and 1 deletions

View File

@ -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