Author: jim++ Date: 2008-03-17 20:30:38 +0100 (Mon, 17 Mar 2008) New Revision: 9392
Modified: trunk/src/common/logger.py Log: Fix another place where database could be malformed, using Asterix work in [9390]. Fixes #3342.
Modified: trunk/src/common/logger.py =================================================================== --- trunk/src/common/logger.py 2008-03-17 10:17:45 UTC (rev 9391) +++ trunk/src/common/logger.py 2008-03-17 19:30:38 UTC (rev 9392) @@ -306,10 +306,11 @@ return 'weather'
def commit_to_db(self, values, write_unread = False): - #print 'saving', values sql = 'INSERT INTO logs (jid_id, contact_name, time, kind, show, message, subject) VALUES (?, ?, ?, ?, ?, ?, ?)' try: self.cur.execute(sql, values) + except sqlite.DatabaseError: + raise exceptions.DatabaseMalformed except sqlite.OperationalError, e: raise exceptions.PysqliteOperationalError(str(e)) message_id = None