From: richard Date: Fri, 5 Dec 2003 04:43:46 +0000 (+0000) Subject: fix more metakit dumbness X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2f7d9169d2937d19865b725da5dbf5178600557;p=roundup.git fix more metakit dumbness git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2017 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/back_metakit.py b/roundup/backends/back_metakit.py index 5303526..38b63bb 100755 --- a/roundup/backends/back_metakit.py +++ b/roundup/backends/back_metakit.py @@ -1,4 +1,4 @@ -# $Id: back_metakit.py,v 1.53 2003-11-14 00:11:18 richard Exp $ +# $Id: back_metakit.py,v 1.54 2003-12-05 04:43:46 richard Exp $ ''' Metakit backend for Roundup, originally by Gordon McMillan. @@ -280,7 +280,7 @@ _marker = [] _ALLOWSETTINGPRIVATEPROPS = 0 -class Class: +class Class(hyperdb.Class): privateprops = None def __init__(self, db, classname, **properties): #self.db = weakref.proxy(db) @@ -1408,11 +1408,13 @@ class FileClass(Class, hyperdb.FileClass): if x.startswith('file:'): fnm = x[5:] try: - x = open(fnm, 'rb').read() + f = open(fnm, 'rb') except IOError, (strerror): # XXX by catching this we donot see an error in the log. return 'ERROR reading file: %s%s\n%s\n%s'%( self.classname, nodeid, poss_msg, strerror) + x = f.read() + f.close() return x def create(self, **propvalues):