From: grubert Date: Wed, 20 Feb 2002 15:48:45 +0000 (+0000) Subject: . roundupdb catches retrieving none existing files. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=205bf332689c81383819d736bedc5cd6dad418d2;p=roundup.git . roundupdb catches retrieving none existing files. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@643 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index d129e52..0a64305 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,7 @@ are given with the most recent entry first. 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. diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index c77a341..9a95f4e 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -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 @@ class FileClass(Class): 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 @@ class IssueClass(Class): # # $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" #