[Zope] SiteAcess (Debian Fix)

The Doctor What docwhat@gerf.org
Fri, 17 Nov 2000 11:09:38 -0600


--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

The bug (number 76658) is listed on Debian's site:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=76658&repeatmerged=yes

The fix (I had forgotten what it was) is stupidly simple:
mkdir /usr/lib/zope/lib/python/Products/SiteAccess/help

A better fix is to fix ProductContext.py is lib/Python/App.  I have
an attached patch, but it doesn't seem like it's the right way to
fix it.

BTW: While you're making empty directories, you should probably
make:
/usr/lib/zope/lib/python/Products/PlugIns/help

Because in the Debian package, it has the same problem.

Ciao!

-- 
"Duct tape is like the force.  It has a light side, and a dark side, and it holds the universe together ..."
		-- Carl Zwanzig

The Doctor What: Un-Humble                       http://docwhat.gerf.org/
docwhat@gerf.org                                                   KF6VNC

--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ProductContext.py.patch"

--- ProductContext.py.orig	Fri Nov 17 11:05:00 2000
+++ ProductContext.py	Fri Nov 17 11:05:06 2000
@@ -309,38 +309,33 @@
         """
         help=self.getProductHelp()
         path=os.path.join(Globals.package_home(self.__pack.__dict__), directory)
-        try:
-	
-            # test to see if nothing has changed since last registration
-            if help.lastRegistered is not None and \
-               help.lastRegistered >= DateTime(os.stat(path)[stat.ST_MTIME]):
-                return
-            help.lastRegistered=DateTime()
         
-            if clear:
-                for id in help.objectIds('Help Topic'):
-                    help._delObject(id)
-
-            for file in os.listdir(path):
-                ext=os.path.splitext(file)[1]
-                ext=string.lower(ext)
-                if ext in ('.dtml',):
-                    ht=HelpTopic.DTMLTopic(file, '', os.path.join(path,file))
-                    self.registerHelpTopic(file, ht)
-                elif ext in ('.html', '.htm'):
-                    ht=HelpTopic.TextTopic(file, '', os.path.join(path,file))
-                    self.registerHelpTopic(file, ht)
-                elif ext in ('.stx', '.txt'):
-                    title=string.split(open(os.path.join(path,file),'rb').readline(), ':')[0]
-                    ht=HelpTopic.STXTopic(file, title, os.path.join(path, file))
-                    self.registerHelpTopic(file, ht)
-                elif ext in ('.jpg', '.gif', '.png'):
-                    ht=HelpTopic.ImageTopic(file, '', os.path.join(path, file))
-                    self.registerHelpTopic(file, ht)
-                elif ext in ('.py',):
-                    ht=APIHelpTopic.APIHelpTopic(file, '', os.path.join(path, file))
-                    self.registerHelpTopic(file, ht)
-        except OSError, (errno, text):
-            from zLOG import LOG, WARNING
-            LOG("Zope", WARNING, text + ": " + path)
-            
+        # test to see if nothing has changed since last registration
+        if help.lastRegistered is not None and \
+                help.lastRegistered >= DateTime(os.stat(path)[stat.ST_MTIME]):
+            return
+        help.lastRegistered=DateTime()
+        
+        if clear:
+            for id in help.objectIds('Help Topic'):
+                help._delObject(id)
+       
+        for file in os.listdir(path):
+            ext=os.path.splitext(file)[1]
+            ext=string.lower(ext)
+            if ext in ('.dtml',):
+                ht=HelpTopic.DTMLTopic(file, '', os.path.join(path,file))
+                self.registerHelpTopic(file, ht)
+            elif ext in ('.html', '.htm'):
+                ht=HelpTopic.TextTopic(file, '', os.path.join(path,file))
+                self.registerHelpTopic(file, ht)
+            elif ext in ('.stx', '.txt'):
+                title=string.split(open(os.path.join(path,file),'rb').readline(), ':')[0]
+                ht=HelpTopic.STXTopic(file, title, os.path.join(path, file))
+                self.registerHelpTopic(file, ht)
+            elif ext in ('.jpg', '.gif', '.png'):
+                ht=HelpTopic.ImageTopic(file, '', os.path.join(path, file))
+                self.registerHelpTopic(file, ht)
+            elif ext in ('.py',):
+                ht=APIHelpTopic.APIHelpTopic(file, '', os.path.join(path, file))
+                self.registerHelpTopic(file, ht)

--azLHFNyN32YCQGCU--