changeset 631:993e0162b7c2

roundupdb catches retrieving none existing files.
author Engelbert Gruber <grubert@users.sourceforge.net>
date Wed, 20 Feb 2002 15:48:45 +0000
parents b3407b616935
children 71bf8f97fe30
files CHANGES.txt roundup/roundupdb.py
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Wed Feb 20 05:52:10 2002 +0000
+++ b/CHANGES.txt	Wed Feb 20 15:48:45 2002 +0000
@@ -3,6 +3,7 @@
 
 2002-02-?? - 0.4.1
 Feature:
+ . roundup db catches retrieving not existing files.
  . #503204 ] mailgw needs a default class
    - partially done - the setting of additional properties can wait for a
      better configuration system.
--- a/roundup/roundupdb.py	Wed Feb 20 05:52:10 2002 +0000
+++ b/roundup/roundupdb.py	Wed Feb 20 15:48:45 2002 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: roundupdb.py,v 1.44 2002-02-15 07:08:44 richard Exp $
+# $Id: roundupdb.py,v 1.45 2002-02-20 15:48:45 grubert Exp $
 
 __doc__ = """
 Extending hyperdb with types specific to issue-tracking.
@@ -227,8 +227,15 @@
     def get(self, nodeid, propname, default=_marker, cache=1):
         ''' trap the content propname and get it from the file
         '''
+
+        poss_msg = 'Possibly a access right configuration problem.'
         if propname == 'content':
-            return self.db.getfile(self.classname, nodeid, None)
+            try:
+                return self.db.getfile(self.classname, nodeid, None)
+            except:
+                # BUG: by catching this we donot see an error in the log.
+                return 'ERROR reading file: %s%s\n%s'%(
+                        self.classname, nodeid, poss_msg)
         if default is not _marker:
             return Class.get(self, nodeid, propname, default, cache=cache)
         else:
@@ -587,6 +594,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.44  2002/02/15 07:08:44  richard
+#  . Alternate email addresses are now available for users. See the MIGRATION
+#    file for info on how to activate the feature.
+#
 # Revision 1.43  2002/02/14 22:33:15  richard
 #  . Added a uniquely Roundup header to email, "X-Roundup-Name"
 #

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