From d208d627a472e8815a93870d72bf1e718e1eaa3b Mon Sep 17 00:00:00 2001 From: steffen123 Date: Mon, 12 Jul 2010 16:48:12 +0200 Subject: [PATCH] stop sqlite&postgres from doing except _mysql.... sqlite gives another error on quit unfortunately --- pyfpdb/fpdb.pyw | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index 763d3ef1..4ba3bb4a 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -844,11 +844,16 @@ class fpdb: #FIXME get two "quitting normally" messages, following the addition of the self.window.destroy() call print "Quitting normally" # TODO: check if current settings differ from profile, if so offer to save or abort - try: + + if self.db.backend==self.db.MYSQL_INNODB: + try: + if self.db is not None and self.db.connected: + self.db.disconnect() + except _mysql_exceptions.OperationalError: # oh, damn, we're already disconnected + pass + else: if self.db is not None and self.db.connected: self.db.disconnect() - except _mysql_exceptions.OperationalError: # oh, damn, we're already disconnected - pass self.statusIcon.set_visible(False) self.window.destroy() # explicitly destroy to allow child windows to close cleanly