From a9731a40169cd50e407e60dc12f67b4ad468754a Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Wed, 17 Dec 2014 01:00:27 +0100 Subject: todo: Move vars in parse_args to approriate location --- todo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'todo') diff --git a/todo b/todo index b13e84c..d0a09a3 100755 --- a/todo +++ b/todo @@ -47,8 +47,6 @@ class Config(): def parse_args(args): config = Config() - home_dir = path.expanduser('~') - data_home = getenv('XDG_DATA_HOME') if args['--id']: config.sort_key = 'id' @@ -62,9 +60,11 @@ def parse_args(args): if args['']: config.todo_file = args[''] else: + data_home = getenv('XDG_DATA_HOME') if data_home: config.todo_file = data_home + '/todo.toml' else: + home_dir = path.expanduser('~') config.todo_file = home_dir + '/.local/share/todo.toml' return config -- cgit v1.2.3-70-g09d2