change except lines

This commit is contained in:
Alan Hamlett 2014-05-26 20:02:30 -07:00
parent 62f297b768
commit f1f57561c4

View file

@ -56,8 +56,8 @@ class Queue(object):
c.execute('INSERT INTO action VALUES (:file,:time,:project,:language,:lines,:branch,:is_write,:plugin)', action) c.execute('INSERT INTO action VALUES (:file,:time,:project,:language,:lines,:branch,:is_write,:plugin)', action)
conn.commit() conn.commit()
conn.close() conn.close()
except sqlite3.Error, e: except sqlite3.Error:
log.error(str(e)) log.error(traceback.format_exc())
def pop(self): def pop(self):
@ -66,7 +66,7 @@ class Queue(object):
action = None action = None
try: try:
conn, c = self.connect() conn, c = self.connect()
except sqlite3.Error, e: except sqlite3.Error:
log.debug(traceback.format_exc()) log.debug(traceback.format_exc())
return None return None
loop = True loop = True
@ -103,12 +103,12 @@ class Queue(object):
'plugin': row[7], 'plugin': row[7],
} }
loop = False loop = False
except sqlite3.Error, e: except sqlite3.Error:
log.debug(traceback.format_exc()) log.debug(traceback.format_exc())
sleep(wait) sleep(wait)
tries -= 1 tries -= 1
try: try:
conn.close() conn.close()
except sqlite3.Error, e: except sqlite3.Error:
log.debug(traceback.format_exc()) log.debug(traceback.format_exc())
return action return action