aboutsummaryrefslogtreecommitdiffstats
path: root/todo
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-12-17 01:00:27 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2014-12-17 01:00:27 +0100
commita9731a40169cd50e407e60dc12f67b4ad468754a (patch)
treea68f5ed35d15d20eb73ba27ed481c8d8f4b32680 /todo
parent70aabd4c82bde916f5af8a7c23f04b267995482d (diff)
downloadbin-a9731a40169cd50e407e60dc12f67b4ad468754a.tar.xz
todo: Move vars in parse_args to approriate location
Diffstat (limited to 'todo')
-rwxr-xr-xtodo4
1 files changed, 2 insertions, 2 deletions
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['<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