Re: Zope database connectivity

Maciej Wisniowski <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
>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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.