Django

Code

Changeset 3038

Show
Ignore:
Timestamp:
05/31/06 22:57:07 (2 years ago)
Author:
adrian
Message:

Fixed #411 -- CursorDebugWrapper? now supports pyformat paramstyle

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/backends/util.py

    r2809 r3038  
    1313        finally: 
    1414            stop = time() 
     15            # If params was a list, convert it to a tuple, because string 
     16            # formatting with '%' only works with tuples or dicts. 
     17            if not isinstance(params, (tuple, dict)): 
     18                params = tuple(params) 
    1519            self.db.queries.append({ 
    1620                'sql': sql % tuple(params),