Adding tests for reading and writing config.
This commit is contained in:
+2
-1
@@ -58,9 +58,10 @@ def read_config():
|
||||
|
||||
|
||||
def write_config(config):
|
||||
os.makedirs(os.path.dirname(config_file()), exist_ok=True)
|
||||
with open(config_file(), 'w') as fp:
|
||||
for key in config:
|
||||
fp.write(key + '=' + config[key] + "\n")
|
||||
fp.write(key + '=' + str(config[key]) + "\n")
|
||||
|
||||
|
||||
def current_country():
|
||||
|
||||
Reference in New Issue
Block a user