From: richard Date: Thu, 12 Sep 2002 07:23:23 +0000 (+0000) Subject: add close() methods where they are missing! X-Git-Url: https://git.tokkee.org/?p=roundup.git;a=commitdiff_plain;h=bef9b71cd99bfe07fe561ec99288b6009eb714c4 add close() methods where they are missing! git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1153 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/TODO.txt b/TODO.txt index 1c7ce5d..fbfd25e 100644 --- a/TODO.txt +++ b/TODO.txt @@ -54,7 +54,6 @@ pending web allow multilink selections to select a "none" element to allow pending dist include the HTML in docs bug web request.url is incorrect in cgi-bin environments -bug web need to indicate that generated pages shouldn't be cached done instance rename to "instance" to "tracker" done hyperdb write a backend for gadfly (it's as done as it's going to get) @@ -82,6 +81,7 @@ done web fix double-submit by having new-item-submit redirect at end done web daemonify roundup-server (fork, logfile, pidfile) done web modify cgitb to display PageTemplate errors better done web have roundup.cgi pick up instance config from the environment +done web indicate that generated pages shouldn't be cached done admin have "set" command be applicable to all items in a class, and also be able to unset properties (ie. set to None) diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index d1e0aa3..1721044 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -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.76 2002-09-12 05:51:42 richard Exp $ +#$Id: back_anydbm.py,v 1.77 2002-09-12 07:23:23 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 @@ -678,6 +678,11 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database): self.destroyednodes = {} self.transactions = [] + def close(self): + ''' Nothing to do + ''' + pass + _marker = [] class Class(hyperdb.Class): '''The handle to a particular class of nodes in a hyperdatabase.''' diff --git a/roundup/backends/back_gadfly.py b/roundup/backends/back_gadfly.py index e0f2bc3..a4add91 100644 --- a/roundup/backends/back_gadfly.py +++ b/roundup/backends/back_gadfly.py @@ -1,4 +1,4 @@ -# $Id: back_gadfly.py,v 1.17 2002-09-12 05:51:42 richard Exp $ +# $Id: back_gadfly.py,v 1.18 2002-09-12 07:23:23 richard Exp $ __doc__ = ''' About Gadfly ============ @@ -790,6 +790,11 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database): # return the classname, nodeid so we reindex this content return (classname, nodeid) + def close(self): + ''' Close off the connection. + ''' + self.conn.close() + # # The base Class class # diff --git a/roundup/backends/back_metakit.py b/roundup/backends/back_metakit.py index 8919382..1c562ab 100755 --- a/roundup/backends/back_metakit.py +++ b/roundup/backends/back_metakit.py @@ -33,6 +33,7 @@ class _Database(hyperdb.Database): self.security = security.Security(self) os.umask(0002) + def post_init(self): if self.indexer.should_reindex(): self.reindex()