Move return value outside try-finally block

The return value is for Glib/GTK event loop, so it should be after
try-finally sequence. The value needs to be returned every time and we
really like to have threads_enter()/threads_leave() to be invoked in
pairs.
This commit is contained in:
Mika Bostrom 2009-11-25 14:42:17 +02:00
parent 9e23346e5b
commit a7163f5f8c

View File

@ -122,10 +122,9 @@ class HUD_main(object):
m.update_gui(new_hand_id) m.update_gui(new_hand_id)
self.hud_dict[table_name].update(new_hand_id, self.config) self.hud_dict[table_name].update(new_hand_id, self.config)
self.hud_dict[table_name].reposition_windows() self.hud_dict[table_name].reposition_windows()
gtk.gdk.threads_leave()
return False
finally: finally:
gtk.gdk.threads_leave() gtk.gdk.threads_leave()
return False
self.hud_dict[table_name] = Hud.Hud(self, table, max, poker_game, self.config, self.db_connection) self.hud_dict[table_name] = Hud.Hud(self, table, max, poker_game, self.config, self.db_connection)
self.hud_dict[table_name].table_name = table_name self.hud_dict[table_name].table_name = table_name