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

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


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

Modified Files:
      Tag: Zope-2_7-branch
	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.24.68.1 => 1.24.68.2 ===
--- Zope/lib/python/HelpSys/HelpSys.py:1.24.68.1	Thu Jan  8 18:33:46 2004
+++ Zope/lib/python/HelpSys/HelpSys.py	Tue Apr 13 02:00:17 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