diff options
-rw-r--r-- | MySQLdb/MySQLdb/connections.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index ca4b360..19d5489 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -120,8 +120,11 @@ class Connection(ConnectionBase): self.messages = [] def __del__(self): - self.close() - + try: + self.close() + except: + pass + def begin(self): """Explicitly begin a transaction. Non-standard.""" self.query("BEGIN") |