diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2016-12-30 13:41:55 +0100 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-01-10 12:15:10 +0100 |
commit | 25a05db31bd773df659aa30c7de31d25f232e5cf (patch) | |
tree | 497b0ff07ac488c73f39141bff22bb61bb9b8e8e /alot/__main__.py | |
parent | 6a89e5ae98e478acd387ba32d825d3fa1392d8cf (diff) |
Remove unneeded expanduser calls
Fixes the -n option.
Diffstat (limited to 'alot/__main__.py')
-rw-r--r-- | alot/__main__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alot/__main__.py b/alot/__main__.py index b55c9999..cc9dca4e 100644 --- a/alot/__main__.py +++ b/alot/__main__.py @@ -62,9 +62,8 @@ def main(): root_logger.removeHandler(log_handler) root_logger = None numeric_loglevel = getattr(logging, options.debug_level.upper(), None) - logfilename = os.path.expanduser(options.logfile) logformat = '%(levelname)s:%(module)s:%(message)s' - logging.basicConfig(level=numeric_loglevel, filename=logfilename, + logging.basicConfig(level=numeric_loglevel, filename=options.logfile, filemode='w', format=logformat) # locate alot config files @@ -78,10 +77,11 @@ def main(): alotconfig = options.config # locate notmuch config - notmuchpath = os.environ.get('NOTMUCH_CONFIG', '~/.notmuch-config') if options.notmuch_config: - notmuchpath = options.notmuch_config - notmuchconfig = os.path.expanduser(notmuchpath) + notmuchconfig = options.notmuch_config + else: + notmuchconfig = os.environ.get('NOTMUCH_CONFIG', + os.path.expanduser('~/.notmuch-config')) try: settings.read_config(alotconfig) |