changeset 166:eead2420b8bc

Fix: Don't crash urwid if no project description is set Urwid doesn't handle None strings carefully therefore set description to an empty string.
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 06 Dec 2012 15:30:49 +0100 (2012-12-06)
parents 83ba64c9a51e
children be9acb00cd97
files getan/view.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/getan/view.py	Thu Dec 06 15:29:16 2012 +0100
+++ b/getan/view.py	Thu Dec 06 15:30:49 2012 +0100
@@ -147,10 +147,14 @@
     def update(self):
         logger.debug("Update ProjectNode '%s'" % self.item.key)
         time_str    = self._get_formatted_time()
+        proj_desc = self.item.desc
+        if proj_desc is None:
+            proj_desc = ""
+
         description = urwid.Text([' ' * self.indent,
                                   ('project_key', self.item.key),
                                   (' '),
-                                  (self.item.desc)])
+                                  (proj_desc)])
         if self._get_time():
             time = urwid.Text('%s (%s)' % (self.mode[1], time_str))
         else:
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)