diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-19 14:40:39 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-19 14:40:39 +0000 |
commit | 6a02d915ee20203ed3ebe828672f2a9f40929a6f (patch) | |
tree | fbd601b3770f6474809cf05ecb19b1f11b900777 /alot/commands/__init__.py | |
parent | 5dfba4506d356a77dd624fa3118b283b7f1cfbb5 (diff) |
replace config with SettingsManager in commands
Diffstat (limited to 'alot/commands/__init__.py')
-rw-r--r-- | alot/commands/__init__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/alot/commands/__init__.py b/alot/commands/__init__.py index 76bbd63a..ff9b7951 100644 --- a/alot/commands/__init__.py +++ b/alot/commands/__init__.py @@ -5,7 +5,7 @@ import shlex import logging import argparse -import alot.settings +from alot.settings import settings import alot.helper @@ -177,8 +177,7 @@ def commandfactory(cmdline, mode='global'): args = args[1:] # unfold aliases - if alot.settings.config.has_option('command-aliases', cmdname): - cmdname = alot.settings.config.get('command-aliases', cmdname) + # TODO: read from settingsmanager # get class, argparser and forced parameter (cmdclass, parser, forcedparms) = lookup_command(cmdname, mode) @@ -192,7 +191,7 @@ def commandfactory(cmdline, mode='global'): logging.debug('PARMS: %s' % parms) # set pre and post command hooks - get_hook = alot.settings.config.get_hook + get_hook = settings.get_hook parms['prehook'] = get_hook('pre_%s_%s' % (mode, cmdname)) or \ get_hook('pre_global_%s' % cmdname) parms['posthook'] = get_hook('post_%s_%s' % (mode, cmdname)) or \ |