Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 650:9b2575610953
Ran it through pychecker, made fixes
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 27 Feb 2002 03:40:59 +0000 |
| parents | 07abfe8f0c01 |
| children | bc46480e2a2b 1b2d0e702ca8 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Wed Feb 27 03:28:21 2002 +0000 +++ b/roundup/backends/back_anydbm.py Wed Feb 27 03:40:59 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.29 2002-02-25 14:34:31 grubert Exp $ +#$Id: back_anydbm.py,v 1.30 2002-02-27 03:40:59 richard Exp $ ''' This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python @@ -24,7 +24,7 @@ ''' import whichdb, anydbm, os, marshal -from roundup import hyperdb, date, password +from roundup import hyperdb, date from blobfiles import FileStorage # @@ -109,7 +109,7 @@ if hyperdb.DEBUG: print 'clear', (self,) for cn in self.classes.keys(): - for type in 'nodes', 'journals': + for dummy in 'nodes', 'journals': path = os.path.join(self.dir, 'journals.%s'%cn) if os.path.exists(path): os.remove(path) @@ -398,7 +398,7 @@ # now insert the journal entry if db.has_key(nodeid): s = db[nodeid] - l = marshal.loads(db[nodeid]) + l = marshal.loads(s) l.append(entry) else: l = [entry] @@ -425,6 +425,11 @@ # #$Log: not supported by cvs2svn $ +#Revision 1.29 2002/02/25 14:34:31 grubert +# . use blobfiles in back_anydbm which is used in back_bsddb. +# change test_db as dirlist does not work for subdirectories. +# ATTENTION: blobfiles now creates subdirectories for files. +# #Revision 1.28 2002/02/16 09:14:17 richard # . #514854 ] History: "User" is always ticket creator #
