UIX:Widget clean WidgetException remove ''.join

This commit is contained in:
Qua-non 2012-07-21 16:00:15 +05:30
parent 265d9858db
commit 33ba4a3e22
1 changed files with 2 additions and 2 deletions

View File

@ -230,8 +230,8 @@ class Widget(EventDispatcher):
parent = widget.parent
# check if widget is already a child of another widget
if parent:
raise WidgetException(''.join(('Cannot add ', str(widget),\
' It already has a parent: ', str(parent))))
raise WidgetException('Cannot add %r, it already has a parent %r'
% (widget, parent))
widget.parent = self
if index == 0 or len(self.children) == 0:
self.children.insert(0, widget)