Commit a0961903 authored by Shane Hathaway's avatar Shane Hathaway

Minor (really, micro) changes that make MountPoint stop outputting needless

error messages.
parent 28ab567c
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Mounted database support """Mounted database support
$Id: Mount.py,v 1.4 2000/06/12 14:45:19 shane Exp $""" $Id: Mount.py,v 1.5 2000/08/03 19:56:35 shane Exp $"""
__version__='$Revision: 1.4 $'[11:-2] __version__='$Revision: 1.5 $'[11:-2]
import Globals, thread, Persistence, Acquisition import Globals, thread, Persistence, Acquisition
import ExtensionClass, string, time, sys import ExtensionClass, string, time, sys
...@@ -197,7 +197,7 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit): ...@@ -197,7 +197,7 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit):
return "%s %s" % (self.__class__.__name__, self._path) return "%s %s" % (self.__class__.__name__, self._path)
def _close(self): def _close(self):
# The onCloseCallback implementation. # The onCloseCallback handler.
# Closes a single connection to the database # Closes a single connection to the database
# and possibly the database itself. # and possibly the database itself.
t = self._v_data t = self._v_data
...@@ -207,10 +207,12 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit): ...@@ -207,10 +207,12 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit):
# This mount point has been deleted. # This mount point has been deleted.
del data._v__object_deleted__ del data._v__object_deleted__
self._v_close_db = 1 self._v_close_db = 1
conn = data._p_jar if data is not None:
try: del conn._mount_parent_jar conn = data._p_jar
except KeyError: pass if conn is not None:
conn.close() try: del conn._mount_parent_jar
except: pass
conn.close()
self._v_data = None self._v_data = None
if self._v_close_db: if self._v_close_db:
# Stop using this database. Close it if no other # Stop using this database. Close it if no other
...@@ -282,7 +284,7 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit): ...@@ -282,7 +284,7 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit):
except: except:
self._v_close_db = 1 self._v_close_db = 1
self._logConnectException() self._logConnectException()
# Wrap around self. # Broken database. Wrap around self.
return Acquisition.ImplicitAcquisitionWrapper(self, parent) return Acquisition.ImplicitAcquisitionWrapper(self, parent)
else: else:
data = t[0] data = t[0]
...@@ -327,5 +329,3 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit): ...@@ -327,5 +329,3 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit):
f=StringIO() f=StringIO()
traceback.print_tb(exc[2], 100, f) traceback.print_tb(exc[2], 100, f)
self._v_connect_error = (exc[0], exc[1], f.getvalue()) self._v_connect_error = (exc[0], exc[1], f.getvalue())
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