diff options
author | pazz <patricktotzke@gmail.com> | 2011-07-24 23:24:42 +0100 |
---|---|---|
committer | pazz <patricktotzke@gmail.com> | 2011-07-24 23:24:42 +0100 |
commit | 8793c9168d196dde55d6dc35e3694c0dc4ab375f (patch) | |
tree | 5b936e5e80c778623213eb5eee8f28e8355dc176 /alot/init.py | |
parent | 23f4e2307a77f8ae43f47ef3f1e0ed686371dd6f (diff) |
oop-idied settings
Diffstat (limited to 'alot/init.py')
-rwxr-xr-x | alot/init.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/alot/init.py b/alot/init.py index 9217bfba..cb96c86a 100755 --- a/alot/init.py +++ b/alot/init.py @@ -21,6 +21,7 @@ import logging import os import settings +from settings import AccountManager from db import DBManager from ui import UI from urwid.command_map import command_map @@ -59,7 +60,11 @@ def main(): #read config file configfilename = os.path.expanduser(args.configfile) - settings.setup(configfilename) + settings.config.read(configfilename) + settings.hooks.setup(settings.config.get('general', 'hooksfile')) + + #accountman + aman = AccountManager(settings.config) # setup logging numeric_loglevel = getattr(logging, args.debug_level.upper(), None) @@ -69,8 +74,6 @@ def main(): # get ourselves a database manager dbman = DBManager(path=args.db_path, ro=args.read_only) - # read accounts - accounts = settings.get_accounts() # set up global urwid command maps command_map['j'] = 'cursor down' @@ -82,7 +85,7 @@ def main(): # set up and start interface ui = UI(dbman, logger, - accounts, + aman, args.query, args.colours, ) |