Skip to content

Commit

Permalink
Fix python mysqldb upstream changes
Browse files Browse the repository at this point in the history
mysqlclient-python 1.3.4 changed cursor connection from weakref proxy to a ref

Fixes #12491
  • Loading branch information
dizygotheca committed Dec 9, 2015
1 parent f6406b9 commit eb622a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mythtv/bindings/python/MythTV/_conn_mysqldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def __init__(self, connection):
self.ping = ref(self._ping122)
self.ping()

def _ping121(self): self.connection.ping(True)
def _ping122(self): self.connection.ping()
def _ping121(self): self._get_db().ping(True)
def _ping122(self): self._get_db().ping()

def _sanitize(self, query): return query.replace('?', '%s')

Expand Down Expand Up @@ -95,8 +95,8 @@ def executemany(self, query, args):
except Exception, e:
raise MythDBError(MythDBError.DB_RAW, e.args)

def commit(self): self.connection.commit()
def rollback(self): self.connection.rollback()
def commit(self): self._get_db().commit()
def rollback(self): self._get_db().rollback()

def __enter__(self):
return self
Expand Down

0 comments on commit eb622a4

Please sign in to comment.