POLISH: it can now quit when it wasn't able to connect to DB

This commit is contained in:
steffen123 2010-07-13 18:04:26 +02:00
parent 1d571cabee
commit d4e54e6aae

View File

@ -845,6 +845,7 @@ class fpdb:
print "Quitting normally"
# TODO: check if current settings differ from profile, if so offer to save or abort
if self.db!=None:
if self.db.backend==self.db.MYSQL_INNODB:
try:
if self.db is not None and self.db.connected:
@ -854,6 +855,8 @@ class fpdb:
else:
if self.db is not None and self.db.connected:
self.db.disconnect()
else:
pass
self.statusIcon.set_visible(False)
self.window.destroy() # explicitly destroy to allow child windows to close cleanly