Mercurial > p > roundup > code
diff roundup/backends/sessions_dbm.py @ 2169:12cd4fa91eb7
OTK generation was busted (thanks Stuart D. Gathman)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 31 Mar 2004 23:08:39 +0000 |
| parents | ae21c1fc41d5 |
| children | 04dc3eef67b7 |
line wrap: on
line diff
--- a/roundup/backends/sessions_dbm.py Wed Mar 31 23:08:08 2004 +0000 +++ b/roundup/backends/sessions_dbm.py Wed Mar 31 23:08:39 2004 +0000 @@ -1,4 +1,4 @@ -#$Id: sessions_dbm.py,v 1.4 2004-03-26 23:56:11 richard Exp $ +#$Id: sessions_dbm.py,v 1.5 2004-03-31 23:08:38 richard Exp $ """This module defines a very basic store that's used by the CGI interface to store session and one-time-key information. @@ -22,6 +22,13 @@ # ensure files are group readable and writable os.umask(0002) + def exists(self, infoid): + db = self.opendb('c') + try: + return db.has_key(infoid) + finally: + db.close() + def clear(self): path = os.path.join(self.dir, self.name) if os.path.exists(path):
