Compare commits
3 commits
3783992de5
...
72b39bc00c
Author | SHA1 | Date | |
---|---|---|---|
72b39bc00c | |||
e4760321b2 | |||
792c53b256 |
1 changed files with 6 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
import configparser
|
import configparser
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config['pomodoro'] = {}
|
config['pomodoro'] = {}
|
||||||
|
@ -22,7 +23,7 @@ if not os.path.isfile('settings.ini'):
|
||||||
pomodoro['logfile'] = ''
|
pomodoro['logfile'] = ''
|
||||||
|
|
||||||
# This path must be absolute, for some reason using ~ for home isn't working:
|
# This path must be absolute, for some reason using ~ for home isn't working:
|
||||||
pomodoro['logpath'] = '/home/mlncn/Projects/agaric/python/pomodoroprompt/log/'
|
pomodoro['logpath'] = '~/Projects/python/pomodoroprompt/log/'
|
||||||
write()
|
write()
|
||||||
|
|
||||||
config.read('settings.ini')
|
config.read('settings.ini')
|
||||||
|
@ -47,4 +48,7 @@ def harvest_set_projects_clients_map(projects_clients_map = {}):
|
||||||
write()
|
write()
|
||||||
|
|
||||||
def harvest_get_projects_clients_map():
|
def harvest_get_projects_clients_map():
|
||||||
|
if 'projects_clients' in harvest:
|
||||||
return json.loads(harvest['projects_clients'])
|
return json.loads(harvest['projects_clients'])
|
||||||
|
else:
|
||||||
|
sys.exit("No project clients available; run fetch_clients_projects.py")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue