changeset 346:487017b424f6

Some version of PySQLite seems to return `None` instead of an empty list for a `fetchall()` call that produces no results.
author cmlenz
date Wed, 12 Apr 2006 16:09:52 +0000
parents 90c79fabe6f1
children ef795ebeac00
files bitten/model.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/model.py
+++ b/bitten/model.py
@@ -752,7 +752,7 @@
         log.id = id
         cursor.execute("SELECT level,message FROM bitten_log_message "
                        "WHERE log=%s ORDER BY line", (id,))
-        log.messages = cursor.fetchall()
+        log.messages = cursor.fetchall() or []
 
         return log
 
Copyright (C) 2012-2017 Edgewall Software