Permalink
Browse files

Merge pull request #12 from dnet/master

Added support for oursql 0.9.3 autoreconnect parameter
  • Loading branch information...
2 parents b6c7102 + 4f8c1d5 commit 3ef732774210573da5039da200c2742836b00478 @dcramer committed Feb 25, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 mysql_oursql/standard/base.py
@@ -163,6 +163,9 @@ def _cursor(self):
kwargs['host'] = settings_dict['HOST']
if settings_dict['PORT']:
kwargs['port'] = int(settings_dict['PORT'])
+ opts = settings_dict['OPTIONS']
+ if 'autoreconnect' in opts:
+ kwargs['autoreconnect'] = opts['autoreconnect']
# We need the number of potentially affected rows after an
# "UPDATE", not the number of changed rows.
kwargs['found_rows'] = True

0 comments on commit 3ef7327

Please sign in to comment.