From a7163f5f8c355d64ba76b2f843b23946ba755731 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Wed, 25 Nov 2009 14:42:17 +0200 Subject: [PATCH] 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. --- pyfpdb/HUD_main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyfpdb/HUD_main.py b/pyfpdb/HUD_main.py index 30844887..453a8e82 100755 --- a/pyfpdb/HUD_main.py +++ b/pyfpdb/HUD_main.py @@ -122,10 +122,9 @@ class HUD_main(object): m.update_gui(new_hand_id) self.hud_dict[table_name].update(new_hand_id, self.config) self.hud_dict[table_name].reposition_windows() - gtk.gdk.threads_leave() - return False finally: 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].table_name = table_name