From a4e9c9c78eb063c5474f9365bce3aaf59381b91d Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 24 Feb 2009 10:56:09 +0100 Subject: [PATCH] Support setting None as the secondary text #384 --- src/sugar/graphics/palette.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py index 43c5677c..ce551bb6 100644 --- a/src/sugar/graphics/palette.py +++ b/src/sugar/graphics/palette.py @@ -355,7 +355,8 @@ class Palette(gtk.Window): setter=set_primary_text) def set_secondary_text(self, label): - label = label.split('\n', 1)[0] + if label is not None: + label = label.split('\n', 1)[0] self._secondary_text = label if label is None: