ZODB. My modified code looks like:

   def __setstate__(self, state):
       Globals.Persistent.__setstate__(self, state)
       if self.connection_string:
           # DM 2005-06-24: what a stupidity to connect on load!
           #  It should be delayed until the connections is really used.
           #  I do not change this here to not break DAs.
           # DM 2005-06-24: "connect_" in order to protect '_v_' attributes
           #try: self.connect(self.connection_string)
           try: self.connect_(self.connection_string)
           except:
               LOG('Shared.DC.ZRDB.Connection',
                   ERROR,
                   'Error connecting to relational database.',
                   error=exc_info())

Do you have 'connect_' defined elsewhere or it is expected to raise
an exception here and just log this?

--
Maciej Wisniowski
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db

Reply via email to