From e5ff87bcbed1531faddf938df24981e5a79fbfc8 Mon Sep 17 00:00:00 2001 From: wiktor w brodlo Date: Wed, 3 Aug 2011 09:15:39 +0000 Subject: iw/timezone_gui.py: fix custom_widegt_handler --- iw/timezone_gui.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index 202719c..ecac31e 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -64,11 +64,14 @@ class TimezoneWindow(InstallWindow): def custom_widget_handler(self, xml, function_name, widget_name, str1, str2, int1, int2): - if hasattr(self, function_name): - handler = getattr(self, function_name) - return handler(str1, str2, int1, int2) + if isinstance(function_name, string): + if hasattr(self, function_name): + handler = getattr(self, function_name) + return handler(str1, str2, int1, int2) + else: + # Lame. + return gtk.Label() else: - # Lame. return gtk.Label() def timezone_widget_create (self, str1, str2, int1, int2): -- cgit v1.2.3-65-gdbad