summaryrefslogtreecommitdiff
path: root/alot/init.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-02-23 17:54:48 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-02-23 18:50:07 +0000
commit1949565c5e62e0a294d2a045c18adb1022324976 (patch)
treec3c6bd21002a6c8e7b6bd21c7b39e6d13b4b88e9 /alot/init.py
parent886887a3bc97e93cff10cb1558b7d452abbbc393 (diff)
read colourmode arg to settingsmanager
Diffstat (limited to 'alot/init.py')
-rwxr-xr-xalot/init.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/alot/init.py b/alot/init.py
index 1221f216..92e8aeeb 100755
--- a/alot/init.py
+++ b/alot/init.py
@@ -142,19 +142,22 @@ def main():
except ConfigError, e: # exit on parse errors
sys.exit(e)
+ # store options given by config swiches to the settingsManager:
+ if args['colour-mode']:
+ settings.set('colourmode', args['colour-mode'])
+
# logging
- ## reset
root_logger = logging.getLogger()
for log_handler in root_logger.handlers:
root_logger.removeHandler(log_handler)
root_logger = None
- ## setup
numeric_loglevel = getattr(logging, args['debug-level'].upper(), None)
logfilename = os.path.expanduser(args['logfile'])
logformat = '%(levelname)s:%(module)s:%(message)s'
logging.basicConfig(level=numeric_loglevel, filename=logfilename,
format=logformat)
+
# get ourselves a database manager
dbman = DBManager(path=args['mailindex-path'], ro=args['read-only'])
@@ -175,10 +178,7 @@ def main():
sys.exit(e)
# set up and start interface
- UI(dbman,
- cmd,
- args['colour-mode'],
- )
+ UI(dbman, cmd)
if __name__ == "__main__":
main()