changeset 140:7413197aba45

Avoid traceback if no projects are available
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 01 Nov 2012 11:28:07 +0100
parents 6a19e721fbd1
children dafff6c3fa12
files getan/view.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/getan/view.py	Wed Oct 31 15:31:20 2012 +0100
+++ b/getan/view.py	Thu Nov 01 11:28:07 2012 +0100
@@ -250,9 +250,10 @@
 
     def update(self):
         logger.debug("ProjectList: update focused project row now.")
-        self.rows[self.focused].update()
-        self._total_time()
-        self.controller.view.loop.draw_screen()
+        if len(self.rows) > 0:
+            self.rows[self.focused].update()
+            self._total_time()
+            self.controller.view.loop.draw_screen()
 
     def update_all(self):
         logger.debug("ProjectList: update all project rows now.")
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)