Permalink
Browse files

Another duh - store the db instance on reconnect

  • Loading branch information...
1 parent 9fc0fef commit 1dbed31f8c5c3ee93a409d3caaa9be94bfd90cf6 @harryf committed Feb 24, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 dammit/db_mysql.py
View
@@ -18,7 +18,8 @@ def retry(self, *args, **kwargs):
try:
return func(self, *args, **kwargs)
except MySQLdb.OperationalError, e:
- self._connect()
+ del self.db
+ self.db = self._connect()
return func(self, *args, **kwargs)
return retry

0 comments on commit 1dbed31

Please sign in to comment.