Commit adf78e5e authored by 's avatar

Merged fix for bug 1659 (__call__ return type inconsistent)

parent c12e5349
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__='''Generic Database Connection Support __doc__='''Generic Database Connection Support
$Id: Connection.py,v 1.28 2000/08/31 21:07:17 brian Exp $''' $Id: Connection.py,v 1.29 2000/10/06 15:36:19 brian Exp $'''
__version__='$Revision: 1.28 $'[11:-2] __version__='$Revision: 1.29 $'[11:-2]
import Globals, OFS.SimpleItem, AccessControl.Role, Acquisition, sys import Globals, OFS.SimpleItem, AccessControl.Role, Acquisition, sys
from DateTime import DateTime from DateTime import DateTime
...@@ -226,7 +226,9 @@ class Connection( ...@@ -226,7 +226,9 @@ class Connection(
try: return self._v_database_connection try: return self._v_database_connection
except AttributeError: except AttributeError:
s=self.connection_string s=self.connection_string
if s: return self.connect(s) if s:
self.connect(s)
return self._v_database_connection
raise 'Database Not Connected',( raise 'Database Not Connected',(
'''The database connection is not connected''') '''The database connection is not connected''')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment