fix call to db.connected()
This commit is contained in:
parent
26642557a1
commit
1d263c8139
|
@ -66,6 +66,7 @@ cl_options = string.join(sys.argv[1:])
|
||||||
(options, argv) = Options.fpdb_options()
|
(options, argv) = Options.fpdb_options()
|
||||||
|
|
||||||
import logging, logging.config
|
import logging, logging.config
|
||||||
|
log = logging.getLogger("fpdb")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pygtk
|
import pygtk
|
||||||
|
@ -854,9 +855,10 @@ class fpdb:
|
||||||
print "Quitting normally"
|
print "Quitting normally"
|
||||||
# TODO: check if current settings differ from profile, if so offer to save or abort
|
# TODO: check if current settings differ from profile, if so offer to save or abort
|
||||||
try:
|
try:
|
||||||
if self.db is not None and self.db.connected:
|
if self.db is not None and self.db.connected():
|
||||||
self.db.disconnect()
|
self.db.disconnect()
|
||||||
except _mysql_exceptions.OperationalError: # oh, damn, we're already disconnected
|
except _mysql_exceptions.OperationalError: # oh, damn, we're already disconnected
|
||||||
|
log.info("fpdb.quit disconnect error being ignored: "+str(sys.exc_info()))
|
||||||
pass
|
pass
|
||||||
self.statusIcon.set_visible(False)
|
self.statusIcon.set_visible(False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user