git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
573b3e8
)
Log failed SQL.
author
CMDR furrycat
<elite@furrycat.net>
Fri, 18 Nov 2016 17:29:02 +0000
(17:29 +0000)
committer
CMDR furrycat
<elite@furrycat.net>
Fri, 18 Nov 2016 17:29:02 +0000
(17:29 +0000)
db.py
patch
|
blob
|
history
diff --git
a/db.py
b/db.py
index
c62ec29
..
bffab1d
100644
(file)
--- a/
db.py
+++ b/
db.py
@@
-53,8
+53,11
@@
class DBConnection(object):
self.open_db()
log.debug(sql.replace('?', '{}').format(*params))
cursor = self.dbh.cursor()
- cursor.execute(sql, params)
- return cursor
+ try:
+ cursor.execute(sql, params)
+ return cursor
+ except sqlite3.OperationalError:
+ log.exception(sql)
def commit(self):
return self.dbh.commit()