From: grubert Date: Mon, 25 Feb 2002 14:23:00 +0000 (+0000) Subject: . roundup db: catch only IOError in getfile. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5231583b03359e4cdb1838339b31795603e177fb;p=roundup.git . roundup db: catch only IOError in getfile. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@656 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index af4064e..8b1f0c8 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 catch only IOError in getfile. . roundup db catches retrieving not existing files. . #503204 ] mailgw needs a default class - partially done - the setting of additional properties can wait for a diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 9a95f4e..3821421 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.45 2002-02-20 15:48:45 grubert Exp $ +# $Id: roundupdb.py,v 1.46 2002-02-25 14:22:59 grubert Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -232,10 +232,10 @@ class FileClass(Class): if propname == 'content': try: return self.db.getfile(self.classname, nodeid, None) - except: + except IOError, (strerror): # 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) + return 'ERROR reading file: %s%s\n%s\n%s'%( + self.classname, nodeid, poss_msg, strerror) if default is not _marker: return Class.get(self, nodeid, propname, default, cache=cache) else: