Browse code

boobank-accounts: defaults to the cache file instead of stdin.

Xavier G authored on29/10/2017 22:24:50
Showing1 changed files

... ...
@@ -1,6 +1,7 @@
1 1
 #!/usr/bin/env python
2 2
 # -*- coding: utf-8 -*-
3 3
 
4
+import os
4 5
 import sys
5 6
 import json
6 7
 import time
... ...
@@ -38,7 +39,7 @@ def get_accounts():
38 39
     try:
39 40
         accounts_json_path = sys.argv[1]
40 41
     except IndexError:
41
-        accounts_json_path = '-'
42
+        accounts_json_path = os.path.expanduser('~/.cache/boobank-cacher/cache.json')
42 43
     if accounts_json_path == '-':
43 44
         return json.load(sys.stdin)
44 45
     else: