Skip to content

Commit d265f91

Browse files
author
Engelbert Gruber
committed
roundupdb catches retrieving none existing files.
1 parent a69fed1 commit d265f91

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ are given with the most recent entry first.
33

44
2002-02-?? - 0.4.1
55
Feature:
6+
. roundup db catches retrieving not existing files.
67
. #503204 ] mailgw needs a default class
78
- partially done - the setting of additional properties can wait for a
89
better configuration system.

roundup/roundupdb.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: roundupdb.py,v 1.44 2002-02-15 07:08:44 richard Exp $
18+
# $Id: roundupdb.py,v 1.45 2002-02-20 15:48:45 grubert Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -227,8 +227,15 @@ def create(self, **propvalues):
227227
def get(self, nodeid, propname, default=_marker, cache=1):
228228
''' trap the content propname and get it from the file
229229
'''
230+
231+
poss_msg = 'Possibly a access right configuration problem.'
230232
if propname == 'content':
231-
return self.db.getfile(self.classname, nodeid, None)
233+
try:
234+
return self.db.getfile(self.classname, nodeid, None)
235+
except:
236+
# BUG: by catching this we donot see an error in the log.
237+
return 'ERROR reading file: %s%s\n%s'%(
238+
self.classname, nodeid, poss_msg)
232239
if default is not _marker:
233240
return Class.get(self, nodeid, propname, default, cache=cache)
234241
else:
@@ -587,6 +594,10 @@ def generateChangeNote(self, nodeid, oldvalues):
587594

588595
#
589596
# $Log: not supported by cvs2svn $
597+
# Revision 1.44 2002/02/15 07:08:44 richard
598+
# . Alternate email addresses are now available for users. See the MIGRATION
599+
# file for info on how to activate the feature.
600+
#
590601
# Revision 1.43 2002/02/14 22:33:15 richard
591602
# . Added a uniquely Roundup header to email, "X-Roundup-Name"
592603
#

0 commit comments

Comments
 (0)