Skip to content

Commit 62ae25b

Browse files
author
Engelbert Gruber
committed
roundup db: catch only IOError in getfile.
1 parent bc2e6bc commit 62ae25b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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 catch only IOError in getfile.
67
. roundup db catches retrieving not existing files.
78
. #503204 ] mailgw needs a default class
89
- partially done - the setting of additional properties can wait for a

roundup/roundupdb.py

Lines changed: 4 additions & 4 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.45 2002-02-20 15:48:45 grubert Exp $
18+
# $Id: roundupdb.py,v 1.46 2002-02-25 14:22:59 grubert Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -232,10 +232,10 @@ def get(self, nodeid, propname, default=_marker, cache=1):
232232
if propname == 'content':
233233
try:
234234
return self.db.getfile(self.classname, nodeid, None)
235-
except:
235+
except IOError, (strerror):
236236
# 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)
237+
return 'ERROR reading file: %s%s\n%s\n%s'%(
238+
self.classname, nodeid, poss_msg, strerror)
239239
if default is not _marker:
240240
return Class.get(self, nodeid, propname, default, cache=cache)
241241
else:

0 commit comments

Comments
 (0)