Mercurial > getan
diff getan.py @ 42:a5439795ef09
More checks againts empty projects.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 15 Dec 2010 12:02:55 +0100 |
parents | f44f808e7d47 |
children | 780bfda9c583 1d63ab21b8af |
line wrap: on
line diff
--- a/getan.py Wed Dec 15 11:55:25 2010 +0100 +++ b/getan.py Wed Dec 15 12:02:55 2010 +0100 @@ -54,7 +54,9 @@ def update_entries(self, project): logger.debug("GetanController: update entries.") - self.entries_view.set_rows(self.backend.load_entries(project.id)) + if project: entries = self.backend.load_entries(project.id) + else: entries = [] + self.entries_view.set_rows(entries) self.view.update_view() def move_selected_entries(self, project): @@ -131,6 +133,7 @@ logger.debug('All running projects: %r' % self.running) def stop_project(self, desc='-no description-'): + if not self.running: return project = self.running.pop() if not project: return logger.info("Stop project '%s' at %s."