[Zodb-checkins] CVS: ZODB/src/persistent - interfaces.py:1.1.2.2

Jeremy Hylton jeremy at zope.com
Thu Feb 12 23:11:06 EST 2004


Update of /cvs-repository/ZODB/src/persistent
In directory cvs.zope.org:/tmp/cvs-serv19357/src/persistent

Modified Files:
      Tag: zope3-zodb3-devel-branch
	interfaces.py 
Log Message:
Minimal change to allow this module to compile without zope.


=== ZODB/src/persistent/interfaces.py 1.1.2.1 => 1.1.2.2 ===
--- ZODB/src/persistent/interfaces.py:1.1.2.1	Thu Feb 12 15:51:12 2004
+++ ZODB/src/persistent/interfaces.py	Thu Feb 12 23:11:00 2004
@@ -11,8 +11,19 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zope.interface import Interface
-from zope.interface import Attribute
+
+try:
+    from zope.interface import Interface
+    from zope.interface import Attribute
+except ImportError:
+
+    # just allow the module to compile if zope isn't available
+
+    class Interface(object):
+        pass
+
+    def Attribute(s):
+        return s
 
 class IPersistent(Interface):
     """Python persistent interface




More information about the Zodb-checkins mailing list