diff --git a/settings.py b/settings.py index 9e6cd7e..f51a456 100644 --- a/settings.py +++ b/settings.py @@ -7,6 +7,11 @@ config = configparser.ConfigParser() config['pomodoro'] = {} pomodoro = config['pomodoro'] +def write(): + with open('settings.ini', 'w') as configfile: + config.write(configfile) + + if not os.path.isfile('settings.ini'): # Set some essential initial values. # pomodoro['logfile'] = '~/Projects/agaric/python/pomodoroprompt/log/2021.csv' @@ -17,10 +22,6 @@ if not os.path.isfile('settings.ini'): config.read('settings.ini') -def write(): - with open('settings.ini', 'w') as configfile: - config.write(configfile) - def pomodoro_logfile(): return config['pomodoro']['logfile']