'None' as self.message is ok, will be treated as empty string
authorFelix Domke <tmbinc@elitedvb.net>
Sat, 24 Nov 2007 14:06:40 +0000 (14:06 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sat, 24 Nov 2007 14:06:40 +0000 (14:06 +0000)
lib/python/Components/VariableText.py

index d20e519..c953309 100644 (file)
@@ -9,7 +9,7 @@ class VariableText(object):
        def setText(self, text):
                self.message = text
                if self.instance:
        def setText(self, text):
                self.message = text
                if self.instance:
-                       self.instance.setText(self.message)
+                       self.instance.setText(self.message or "")
 
        def setMarkedPos(self, pos):
                if self.instance:
 
        def setMarkedPos(self, pos):
                if self.instance:
@@ -21,4 +21,4 @@ class VariableText(object):
        text = property(getText, setText)
        
        def postWidgetCreate(self, instance):
        text = property(getText, setText)
        
        def postWidgetCreate(self, instance):
-               instance.setText(self.message)
+               instance.setText(self.message or "")