add rollback() to make sure db locks are released

This commit is contained in:
sqlcoder 2009-05-03 01:46:18 +01:00
parent fddb29b3b8
commit e60c254204

View File

@ -87,6 +87,7 @@ class GuiGraphViewer (threading.Thread):
self.canvas = None self.canvas = None
self.mainHBox.show_all() self.mainHBox.show_all()
self.db.db.rollback()
################################# #################################
# #
@ -224,6 +225,7 @@ class GuiGraphViewer (threading.Thread):
self.cursor.execute(tmp) self.cursor.execute(tmp)
#returns (HandId,Winnings,Costs,Profit) #returns (HandId,Winnings,Costs,Profit)
winnings = self.db.cursor.fetchall() winnings = self.db.cursor.fetchall()
self.db.db.rollback()
if(winnings == ()): if(winnings == ()):
return None return None