Set and get don't work symetrically for config parser sections bwahahaha
This commit is contained in:
parent
206530b235
commit
0077a27da0
1 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ pomodoro = config['pomodoro']
|
|||
|
||||
if not os.path.isfile('settings.ini'):
|
||||
# Set some essential initial values.
|
||||
pomodoro['logfile'] = '~/Projects/agaric/python/pomodoroprompt/logs/2021.csv'
|
||||
pomodoro['logfile'] = '~/Projects/agaric/python/pomodoroprompt/log/2021.csv'
|
||||
write()
|
||||
|
||||
config.read('settings.ini')
|
||||
|
@ -22,9 +22,9 @@ def write():
|
|||
def pomodoro_logfile():
|
||||
return config['pomodoro']['logfile']
|
||||
|
||||
def pomodoro_latest_recorded(value = None):
|
||||
if value:
|
||||
pomodoro.set('latest_recorded', value)
|
||||
def pomodoro_latest_recorded(timestamp = None):
|
||||
if timestamp:
|
||||
config.set('pomodoro', 'latest_recorded', str(timestamp))
|
||||
write()
|
||||
else:
|
||||
return pomodoro.get('latest_recorded', None)
|
||||
|
|
Loading…
Reference in a new issue