Skip to content

Commit

Permalink
Merge pull request #12 from dnet/master
Browse files Browse the repository at this point in the history
Added support for oursql 0.9.3 autoreconnect parameter
  • Loading branch information
dcramer committed Feb 25, 2012
2 parents b6c7102 + 4f8c1d5 commit 3ef7327
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mysql_oursql/standard/base.py
Expand Up @@ -163,6 +163,9 @@ def _cursor(self):
kwargs['host'] = settings_dict['HOST'] kwargs['host'] = settings_dict['HOST']
if settings_dict['PORT']: if settings_dict['PORT']:
kwargs['port'] = int(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 # We need the number of potentially affected rows after an
# "UPDATE", not the number of changed rows. # "UPDATE", not the number of changed rows.
kwargs['found_rows'] = True kwargs['found_rows'] = True
Expand Down

0 comments on commit 3ef7327

Please sign in to comment.