actually import _mysql_exceptions before trying to test against it

This commit is contained in:
Eric Blade 2010-10-11 18:23:22 -04:00
parent dc215a5d01
commit fb206dfde6

View File

@ -962,6 +962,7 @@ class fpdb:
if self.db!=None:
if self.db.backend==self.db.MYSQL_INNODB:
try:
import _mysql_exceptions
if self.db is not None and self.db.is_connected():
self.db.disconnect()
except _mysql_exceptions.OperationalError: # oh, damn, we're already disconnected