[POS-commit] Kiwi/Kiwi Proxies.py,1.62,1.63
kiko at async.com.br
kiko at async.com.br
Mon May 5 08:57:10 BRST 2003
Update of /cvs/Kiwi/Kiwi
In directory anthem:/tmp/cvs-serv6539/Kiwi
Modified Files:
Proxies.py
Log Message:
Check if widget type has a proxy defined, and raise a TypeError if not
found. Added a testcase to cover this. Original patch by Karl Putland
<karl at putland.linux-site.net>
Index: Proxies.py
===================================================================
RCS file: /cvs/Kiwi/Kiwi/Proxies.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- Proxies.py 2 May 2003 06:55:27 -0000 1.62
+++ Proxies.py 5 May 2003 11:57:07 -0000 1.63
@@ -393,8 +393,13 @@
self._check_radiobutton(attr_name)
continue
- wpklass = standard_widgets[widget_type]
+ try:
+ wpklass = standard_widgets[widget_type]
+ except KeyError:
+ raise TypeError, "No proxy widget defined for `%s' %s\n" \
+ % (attr_name, widget)
widgetproxy = wpklass(self, widget, attr_name)
+
# XXX: move these out when Widget() is implemented
if pre_formats.has_key(attr_name):
More information about the POS-commit
mailing list