summaryrefslogtreecommitdiff
path: root/alot/__main__.py
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2017-01-01 17:19:50 +0100
committerLucas Hoffmann <l-m-h@web.de>2017-01-10 12:15:20 +0100
commitb04907483366373ac8a5f360f336a922fdf3cb87 (patch)
tree8ee7ddbd1a8824dafaaf2eed4790d124eb9168b1 /alot/__main__.py
parent125cb693518486ebd002c1e6754b27bbf7e6305d (diff)
Release config files after command line parsing
This was tested with lsof(8) and the files are not open when alot is up and running.
Diffstat (limited to 'alot/__main__.py')
-rw-r--r--alot/__main__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/alot/__main__.py b/alot/__main__.py
index b8bb6d2c..d68b5b87 100644
--- a/alot/__main__.py
+++ b/alot/__main__.py
@@ -22,12 +22,12 @@ def main():
version=alot.__version__)
parser.add_argument('-r', '--read-only', action='store_true',
help='open db in read only mode')
- parser.add_argument('-c', '--config', type=argparse.FileType('r'),
- help='config file')
- parser.add_argument('-n', '--notmuch-config', type=argparse.FileType('r'),
- default=os.environ.get(
+ parser.add_argument('-c', '--config', help='config file',
+ type=lambda x: argparse.FileType('r')(x).name)
+ parser.add_argument('-n', '--notmuch-config', default=os.environ.get(
'NOTMUCH_CONFIG',
os.path.expanduser('~/.notmuch-config')),
+ type=lambda x: argparse.FileType('r')(x).name,
help='notmuch config')
parser.add_argument('-C', '--colour-mode',
choices=(1, 16, 256), type=int, default=256,