[Zope-Checkins] CVS: Zope/lib/python/HelpSys - HelpSys.py:1.26

Stuart Bishop zen at shangri-la.dropbear.id.au
Tue Apr 13 02:01:46 EDT 2004


Update of /cvs-repository/Zope/lib/python/HelpSys
In directory cvs.zope.org:/tmp/cvs-serv18641

Modified Files:
	HelpSys.py 
Log Message:
Don't blow up if we have references to non-existant products laying around


=== Zope/lib/python/HelpSys/HelpSys.py 1.25 => 1.26 ===
--- Zope/lib/python/HelpSys/HelpSys.py:1.25	Thu Jan 15 17:44:07 2004
+++ Zope/lib/python/HelpSys/HelpSys.py	Tue Apr 13 02:01:45 2004
@@ -258,17 +258,22 @@
             if hasattr(topic,'isAPIHelpTopic') and topic.isAPIHelpTopic:
                 apitopics.append(topic)
             else:
-                if callable(topic.id):
-                    id=topic.id()
-                else:
-                    id=topic.id
-                if id[:5]=='dtml-':
-                    dtmltopics.append(topic)
-                if (id[:5] in ('metal', 'tales') and id[5] in ('.', '-')) or \
-                   (id[:3]=='tal' and id[3] in ('.', '-')):
-                    zpttopics.append(topic)
-                else:
-                    topics.append(topic)
+                try:
+                    if callable(topic.id):
+                        id=topic.id()
+                    else:
+                        id=topic.id
+                    if id[:5]=='dtml-':
+                        dtmltopics.append(topic)
+                    if (id[:5] in ('metal', 'tales') and id[5] in ('.', '-')) or \
+                    (id[:3]=='tal' and id[3] in ('.', '-')):
+                        zpttopics.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:
             topics = topics + [TreeCollection(' DTML Reference', dtmltopics)]
         if apitopics:




More information about the Zope-Checkins mailing list