Code

sqlite backend!
[roundup.git] / roundup / backends / back_anydbm.py
index f36213d0ecab9f70b8d3ca937793c68405212493..e50a9603c0366e5125470da4489b1e2f485a7336 100644 (file)
@@ -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.78 2002-09-13 08:20:07 richard Exp $
+#$Id: back_anydbm.py,v 1.80 2002-09-17 23:59: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
@@ -121,7 +121,10 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database):
         '''
         if __debug__:
             print >>hyperdb.DEBUG, 'getclass', (self, classname)
-        return self.classes[classname]
+        try:
+            return self.classes[classname]
+        except KeyError:
+            raise KeyError, 'There is no class called "%s"'%classname
 
     #
     # Class DBs
@@ -1874,8 +1877,7 @@ class FileClass(Class):
             modified.
         '''
         d = Class.getprops(self, protected=protected).copy()
-        if protected:
-            d['content'] = hyperdb.String()
+        d['content'] = hyperdb.String()
         return d
 
     def index(self, nodeid):