[Zope3-checkins] CVS: Zope3/src/zodb/storage - base.py:1.24

Barry Warsaw barry@wooz.org
Sun, 23 Mar 2003 10:14:37 -0500


Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv22773

Modified Files:
	base.py 
Log Message:
Steve Alexander points out the obvious -- the fake exceptions should
derive from Exception.


=== Zope3/src/zodb/storage/base.py 1.23 => 1.24 ===
--- Zope3/src/zodb/storage/base.py:1.23	Fri Mar 21 11:42:45 2003
+++ Zope3/src/zodb/storage/base.py	Sun Mar 23 10:14:37 2003
@@ -25,7 +25,6 @@
 import struct
 import threading
 import logging
-from types import ClassType
 
 # In Python 2.3, we can simply use the bsddb module, but for Python 2.2, we
 # need to use pybsddb3, a.k.a. bsddb3.
@@ -44,14 +43,8 @@
         DB_DUP = 2
         DB_FORCE = 3
 
-        # These are exceptions and thus must be classic classes
-        class DBNotFoundError:
-            __metaclass__ = ClassType
-            pass
-
-        class DBKeyEmpty:
-            __metaclass__ = ClassType
-            pass
+        class DBNotFoundError(Exception): pass
+        class DBKeyEmpty(Exception): pass
 
 
 from zodb.conflict import ConflictResolver