diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-17 01:00:27 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-17 01:00:27 +0100 |
commit | 9336fb5fde9ef9ec8ccde6d3e0ae2670e80af3ab (patch) | |
tree | 6e293a068aca423451e09187ffcc07a341ff490d | |
parent | 9cb11f52db3583e8d84189c2d6bae23555a7f984 (diff) | |
download | todo-9336fb5fde9ef9ec8ccde6d3e0ae2670e80af3ab.tar.xz |
todo: Move vars in parse_args to approriate location
-rwxr-xr-x | todo | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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['<file>']: config.todo_file = args['<file>'] 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 |