summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 12a4d1f)
raw | patch | inline | side by side (parent: 12a4d1f)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 15 Sep 2002 23:06:20 +0000 (23:06 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 15 Sep 2002 23:06:20 +0000 (23:06 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1169 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/backends/back_anydbm.py | patch | blob | history | |
roundup/backends/back_gadfly.py | patch | blob | history | |
roundup/backends/back_metakit.py | patch | blob | history |
index f36213d0ecab9f70b8d3ca937793c68405212493..91f8a76a4221d7ee7be304f19af475493bdf89e1 100644 (file)
# 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.79 2002-09-15 23:06:20 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
'''
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
index b6579bf98b9aaacbb5d800d4ef377c2a9b386770..225f341a5c6365037ab8a78805cb4a186d7f1105 100644 (file)
-# $Id: back_gadfly.py,v 1.19 2002-09-13 08:20:13 richard Exp $
+# $Id: back_gadfly.py,v 1.20 2002-09-15 23:06:20 richard Exp $
__doc__ = '''
About Gadfly
============
'''
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
def clear(self):
''' Delete all database contents.
index c7592a4cd13da87c1ec6b9e70ec17bab8d5f756f..43a52238f65cba8aa7da74948347e9b3596d0843 100755 (executable)
return self.dirty
return self.getclass(classname)
def getclass(self, classname):
- return self.classes[classname]
+ try:
+ return self.classes[classname]
+ except KeyError:
+ raise KeyError, 'There is no class called "%s"'%classname
def getclasses(self):
return self.classes.keys()
# --- end of ping's spec