Mercurial > getan
changeset 297:b9f4cd43f341
Fix codingstyle for pep8
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 11 Oct 2013 09:28:31 +0200 |
parents | c7a867c16ff2 |
children | 7306ef85079c |
files | getan/controller.py |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/getan/controller.py Fri Oct 11 09:22:01 2013 +0200 +++ b/getan/controller.py Fri Oct 11 09:28:31 2013 +0200 @@ -12,7 +12,7 @@ import logging import urwid -from datetime import datetime +from datetime import datetime from getan.view import GetanView from getan.states import PausedProjectsState @@ -21,6 +21,7 @@ logger = logging.getLogger() + class GetanController(object): def __init__(self, backend, pv_class, ev_class): @@ -29,16 +30,16 @@ self.config = Config() - self.backend = backend + self.backend = backend projects, entries = self.load_projects() self.projects = projects - self.running = [] + self.running = [] self.view = None self.entries_view = ev_class(entries) self.project_view = pv_class(self, self.projects) - self.view = GetanView(self, self.project_view, self.entries_view) + self.view = GetanView(self, self.project_view, self.entries_view) self.state = PausedProjectsState(self, self.project_view) def main(self): @@ -66,8 +67,8 @@ return (projects, entries) def update_entries(self, project): - logger.debug("GetanController: update entries for project %s." % \ - project.id) + logger.debug("GetanController: update entries for project %s." % + project.id) if project: entries = self.backend.load_entries(project.id) else: @@ -93,7 +94,7 @@ if node.selected: node.select() entries.append(node.item) - logger.info("GetanController: move entry '%s' (id = %d, "\ + logger.info("GetanController: move entry '%s' (id = %d, " "project id = %d) to project '%s'" % (node.item.desc, node.item.id, node.item.project_id, project.desc)) @@ -102,7 +103,7 @@ def delete_entries(self, entry_nodes): if not entry_nodes: return - proj = self.project_by_id(entry_nodes[0].project_id) + proj = self.project_by_id(entry_nodes[0].project_id) entries = entry_nodes self.backend.delete_entries(entries) proj.entries = self.backend.load_entries(proj.id)