diff roundup/backends/back_metakit.py @ 1417:472c21af7f69

fixed error in indexargs_url (thanks Patrick Ohly) fixed getnode [SF#684531]
author Richard Jones <richard@users.sourceforge.net>
date Wed, 12 Feb 2003 00:00:32 +0000
parents 083cce7840aa
children c70068162e64
line wrap: on
line diff
--- a/roundup/backends/back_metakit.py	Sat Feb 08 15:31:28 2003 +0000
+++ b/roundup/backends/back_metakit.py	Wed Feb 12 00:00:32 2003 +0000
@@ -50,7 +50,7 @@
             pass
     return db
 
-class _Database(hyperdb.Database):
+class _Database(hyperdb.Database, roundupdb.Database):
     def __init__(self, config, journaltag=None):
         self.config = config
         self.journaltag = journaltag
@@ -1206,13 +1206,16 @@
 
     def get(self, nodeid, propname, default=_marker, cache=1):
         x = Class.get(self, nodeid, propname, default, cache)
+        poss_msg = 'Possibly an access right configuration problem.'
         if propname == 'content':
             if x.startswith('file:'):
                 fnm = x[5:]
                 try:
                     x = open(fnm, 'rb').read()
-                except Exception, e:
-                    x = repr(e)
+                except IOError, (strerror):
+                    # XXX by catching this we donot see an error in the log.
+                    return 'ERROR reading file: %s%s\n%s\n%s'%(
+                            self.classname, nodeid, poss_msg, strerror)
         return x
 
     def create(self, **propvalues):

Roundup Issue Tracker: http://roundup-tracker.org/