Mercurial > p > roundup > code
diff roundup/backends/sessions_dbm.py @ 3925:603ec9630b08
i18n for hyperdb and backend errors
I got all of the hyperdb exceptions. There were some ValueErrors
in some of the backends that I left untouched.
I wasn't sure how to regenerate the roundup.pot file so
that still needs to be done
I think this takes care of [SF#1069258]
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Thu, 27 Sep 2007 06:18:53 +0000 |
| parents | 21d3d7eeea8c |
| children | 0112e9e1d068 |
line wrap: on
line diff
--- a/roundup/backends/sessions_dbm.py Thu Sep 27 06:12:57 2007 +0000 +++ b/roundup/backends/sessions_dbm.py Thu Sep 27 06:18:53 2007 +0000 @@ -1,4 +1,4 @@ -#$Id: sessions_dbm.py,v 1.8 2007-09-27 06:12:57 jpend Exp $ +#$Id: sessions_dbm.py,v 1.9 2007-09-27 06:18:53 jpend Exp $ """This module defines a very basic store that's used by the CGI interface to store session and one-time-key information. @@ -9,6 +9,7 @@ import anydbm, whichdb, os, marshal, time from roundup import hyperdb +from roundup.i18n import _ class BasicDatabase: ''' Provide a nice encapsulation of an anydbm store. @@ -45,7 +46,8 @@ if os.path.exists(path): db_type = whichdb.whichdb(path) if not db_type: - raise hyperdb.DatabaseError, "Couldn't identify database type" + raise hyperdb.DatabaseError, \ + _("Couldn't identify database type") elif os.path.exists(path+'.db'): # if the path ends in '.db', it's a dbm database, whether # anydbm says it's dbhash or not! @@ -156,3 +158,4 @@ class OneTimeKeys(BasicDatabase): name = 'otks' +# vim: set sts ts=4 sw=4 et si :
