Ticket #10851: mysql_default_params_tuple.diff

File mysql_default_params_tuple.diff, 1.2 KB (added by Walter Doekes, 16 years ago)

replace args=None with params=() in MySQL CursorWrapper

  • /usr/share/python-support/python-django/django/db/backends/mysql/base.py

    old new  
    7878    def __init__(self, cursor):
    7979        self.cursor = cursor
    8080
    81     def execute(self, query, args=None):
     81    def execute(self, query, params=()):
    8282        try:
    83             return self.cursor.execute(query, args)
     83            return self.cursor.execute(query, params)
    8484        except Database.OperationalError, e:
    8585            # Map some error codes to IntegrityError, since they seem to be
    8686            # misclassified and Django would prefer the more logical place.
     
    8888                raise Database.IntegrityError(tuple(e))
    8989            raise
    9090
    91     def executemany(self, query, args):
     91    def executemany(self, query, params):
    9292        try:
    93             return self.cursor.executemany(query, args)
     93            return self.cursor.executemany(query, params)
    9494        except Database.OperationalError, e:
    9595            # Map some error codes to IntegrityError, since they seem to be
    9696            # misclassified and Django would prefer the more logical place.
Back to Top