Skip to content

Commit 24c878b

Browse files
author
Richard Jones
committed
fix more metakit dumbness
1 parent 5ac4542 commit 24c878b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

roundup/backends/back_metakit.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: back_metakit.py,v 1.53 2003-11-14 00:11:18 richard Exp $
1+
# $Id: back_metakit.py,v 1.54 2003-12-05 04:43:46 richard Exp $
22
'''
33
Metakit backend for Roundup, originally by Gordon McMillan.
44
@@ -280,7 +280,7 @@ def setid(self, classname, maxid):
280280

281281
_ALLOWSETTINGPRIVATEPROPS = 0
282282

283-
class Class:
283+
class Class(hyperdb.Class):
284284
privateprops = None
285285
def __init__(self, db, classname, **properties):
286286
#self.db = weakref.proxy(db)
@@ -1408,11 +1408,13 @@ def get(self, nodeid, propname, default=_marker, cache=1):
14081408
if x.startswith('file:'):
14091409
fnm = x[5:]
14101410
try:
1411-
x = open(fnm, 'rb').read()
1411+
f = open(fnm, 'rb')
14121412
except IOError, (strerror):
14131413
# XXX by catching this we donot see an error in the log.
14141414
return 'ERROR reading file: %s%s\n%s\n%s'%(
14151415
self.classname, nodeid, poss_msg, strerror)
1416+
x = f.read()
1417+
f.close()
14161418
return x
14171419

14181420
def create(self, **propvalues):

0 commit comments

Comments
 (0)