Edgewall Software

Changeset 2048

Show
Ignore:
Timestamp:
08/04/05 13:55:05 (4 years ago)
Author:
cmlenz
Message:

PySQLite 2.x returns instead of an empty sequence when a query produces no rows, so make sure the report module uses empty sequences. Closes #1869.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trac/ticket/report.py

    r2038 r2048  
    414414 
    415415        # FIXME: fetchall should probably not be used. 
    416         info = cursor.fetchall() 
    417         cols = cursor.description 
     416        info = cursor.fetchall() or [] 
     417        cols = cursor.description or [] 
    418418 
    419419        db.rollback() 
    420420 
    421         return [cols, info] 
     421        return cols, info 
    422422 
    423423    def get_info(self, db, id, args):