Mercurial > getan
changeset 39:d4ce02a33acd
Minor fixes (logging, states)
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 15 Dec 2010 11:35:59 +0100 |
parents | aa6c4aca2f8d |
children | e4759cc8f5e7 |
files | ChangeLog getan/config.py getan/resources.py getan/states.py |
diffstat | 4 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Dec 15 10:38:15 2010 +0100 +++ b/ChangeLog Wed Dec 15 11:35:59 2010 +0100 @@ -1,3 +1,11 @@ +2010-12-15 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + Some minor fixes + + * getan/config.py: Proper use of global logger. + * getan/resources.py: Removed needless import + * getan/states.py: Fixed state errors + 2010-12-15 Sascha L. Teichmann <sascha.teichmann@intevation.de> Fix for #1624
--- a/getan/config.py Wed Dec 15 10:38:15 2010 +0100 +++ b/getan/config.py Wed Dec 15 11:35:59 2010 +0100 @@ -19,6 +19,7 @@ def setup_logging(): + global logger logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s', filename='getan.log',
--- a/getan/resources.py Wed Dec 15 10:38:15 2010 +0100 +++ b/getan/resources.py Wed Dec 15 11:35:59 2010 +0100 @@ -1,6 +1,5 @@ import gettext as py_gettext import os -import sys _base_dir = os.path.join(os.path.dirname(__file__), os.pardir) share_dir = os.path.join(_base_dir, "share")
--- a/getan/states.py Wed Dec 15 10:38:15 2010 +0100 +++ b/getan/states.py Wed Dec 15 11:35:59 2010 +0100 @@ -88,7 +88,6 @@ return self def select(self): - proj_node = self.view.select() self.controller.start_project(self.view.item_in_focus()) return RunningProjectsState(self.controller, self.view) @@ -231,7 +230,10 @@ self.footer.set_edit_pos(pos) elif len(key) >= 1 and len(key[0]) == 1: return self.insert(key) - return self + return self + + def enter(self): + raise Exception("Not implemented") def exit(self): return self.state @@ -244,12 +246,12 @@ class BaseTimeState(HandleUserInputState): def __init__(self, controller, view, running_state): - super(BaseTimeState, self).__init__(controller, view, running_state, + super(HandleUserInputState, self).__init__(controller, view, running_state, view.frame.get_footer()) def exit(self): self.view._total_time() - return self.running_state + return self.state def insert(self, key): if key[0] in ['0','1','2','3','4','5','6','7','8','9']: