Commit 020e4aa7 authored by Stuart Bishop's avatar Stuart Bishop

Don't blow up if we have references to non-existant products laying around

parent 76a882fb
...@@ -258,17 +258,22 @@ class ProductHelp(Acquisition.Implicit, ObjectManager, Item, Persistent): ...@@ -258,17 +258,22 @@ class ProductHelp(Acquisition.Implicit, ObjectManager, Item, Persistent):
if hasattr(topic,'isAPIHelpTopic') and topic.isAPIHelpTopic: if hasattr(topic,'isAPIHelpTopic') and topic.isAPIHelpTopic:
apitopics.append(topic) apitopics.append(topic)
else: else:
if callable(topic.id): try:
id=topic.id() if callable(topic.id):
else: id=topic.id()
id=topic.id else:
if id[:5]=='dtml-': id=topic.id
dtmltopics.append(topic) if id[:5]=='dtml-':
if (id[:5] in ('metal', 'tales') and id[5] in ('.', '-')) or \ dtmltopics.append(topic)
(id[:3]=='tal' and id[3] in ('.', '-')): if (id[:5] in ('metal', 'tales') and id[5] in ('.', '-')) or \
zpttopics.append(topic) (id[:3]=='tal' and id[3] in ('.', '-')):
else: zpttopics.append(topic)
topics.append(topic) else:
topics.append(topic)
except ImportError:
# Don't blow up if we have references to non-existant
# products laying around
pass
if dtmltopics: if dtmltopics:
topics = topics + [TreeCollection(' DTML Reference', dtmltopics)] topics = topics + [TreeCollection(' DTML Reference', dtmltopics)]
if apitopics: if apitopics:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment