comparison roundup/backends/back_anydbm.py @ 464:29f5ac8a0d2b

Fixed bugs: . Fixed file creation and retrieval in same transaction in anydbm backend . Cgi interface now renders new issue after issue creation . Could not set issue status to resolved through cgi interface . Mail gateway was changing status back to 'chatting' if status was omitted as an argument
author Roche Compaan <rochecompaan@users.sourceforge.net>
date Tue, 18 Dec 2001 15:30:34 +0000
parents b579418f7ed1
children a1a44636bace
comparison
equal deleted inserted replaced
463:045f7fcc2c0f 464:29f5ac8a0d2b
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 #$Id: back_anydbm.py,v 1.19 2001-12-17 03:52:48 richard Exp $ 18 #$Id: back_anydbm.py,v 1.20 2001-12-18 15:30:34 rochecompaan Exp $
19 ''' 19 '''
20 This module defines a backend that saves the hyperdatabase in a database 20 This module defines a backend that saves the hyperdatabase in a database
21 chosen by anydbm. It is guaranteed to always be available in python 21 chosen by anydbm. It is guaranteed to always be available in python
22 versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several 22 versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
23 serious bugs, and is not available) 23 serious bugs, and is not available)
270 self.transactions.append((self._doStoreFile, (name, ))) 270 self.transactions.append((self._doStoreFile, (name, )))
271 271
272 def getfile(self, classname, nodeid, property): 272 def getfile(self, classname, nodeid, property):
273 '''Store the content of the file in the database. 273 '''Store the content of the file in the database.
274 ''' 274 '''
275 return open(self.filename(classname, nodeid, property), 'rb').read() 275 filename = self.filename(classname, nodeid, property)
276 try:
277 return open(filename, 'rb').read()
278 except:
279 return open(filename+'.tmp', 'rb').read()
276 280
277 281
278 # 282 #
279 # Journal 283 # Journal
280 # 284 #
396 self.newnodes = {} 400 self.newnodes = {}
397 self.transactions = [] 401 self.transactions = []
398 402
399 # 403 #
400 #$Log: not supported by cvs2svn $ 404 #$Log: not supported by cvs2svn $
405 #Revision 1.19 2001/12/17 03:52:48 richard
406 #Implemented file store rollback. As a bonus, the hyperdb is now capable of
407 #storing more than one file per node - if a property name is supplied,
408 #the file is called designator.property.
409 #I decided not to migrate the existing files stored over to the new naming
410 #scheme - the FileClass just doesn't specify the property name.
411 #
401 #Revision 1.18 2001/12/16 10:53:38 richard 412 #Revision 1.18 2001/12/16 10:53:38 richard
402 #take a copy of the node dict so that the subsequent set 413 #take a copy of the node dict so that the subsequent set
403 #operation doesn't modify the oldvalues structure 414 #operation doesn't modify the oldvalues structure
404 # 415 #
405 #Revision 1.17 2001/12/14 23:42:57 richard 416 #Revision 1.17 2001/12/14 23:42:57 richard

Roundup Issue Tracker: http://roundup-tracker.org/