pazz/alot — Issue #230: Can't notify() from config
Author: 0x64746b
Created: 2012-01-05 00:42:19+00:00
State: open

```
$ git diff
diff --git a/alot/settings.py b/alot/settings.py
index a9cdb27..82d5ae7 100644
--- a/alot/settings.py
+++ b/alot/settings.py
@@ -188,6 +188,7 @@ class AlotConfigParser(FallbackConfigParser):
" 'thread_highlight_rules' in section" \
" 'general': {reason}".format(reason=err))
logging.exception(report)
+ self.ui.notify('moo')
finally:
return rules

diff --git a/alot/ui.py b/alot/ui.py
index d3ada99..d5759cf 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -89,6 +89,7 @@ class UI(object):
self.dbman.ui = self # register ui with dbman
self.logger = log
self.accountman = accountman
+ config.ui = self # register ui with config parser

if not colourmode:
colourmode = config.getint('general', 'colourmode')

```

```
Traceback (most recent call last):
File "/home/dtk/.local/bin/alot", line 20, in
main()
File "/home/dtk/.local/lib/python2.7/site-packages/alot/init.py", line 172, in main
args['colour-mode'],
File "/home/dtk/.local/lib/python2.7/site-packages/alot/ui.py", line 113, in __init__
self.mainloop.run()
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/raw_display.py", line 229, in run_wrapper
return fn()
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 285, in _run
self.draw_screen()
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 508, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/widget.py", line 132, in cached_render
canv = fn(self, size, focus=focus)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/widget.py", line 1318, in render
canv = get_delegate(self).render(size, focus=focus)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/widget.py", line 132, in cached_render
canv = fn(self, size, focus=focus)
File "/home/dtk/.local/lib/python2.7/site-packages/urwid/container.py", line 609, in render
assert foot.rows() == frows, "rows, render mismatch"
AssertionError: rows, render mismatch
```