From 9e4c3506d50ff6032b8f1ae8cdc4d4ae1d1fa54b Mon Sep 17 00:00:00 2001 From: "Maxime Alves LIRMM@home" Date: Tue, 28 Jul 2020 09:54:29 +0200 Subject: [PATCH] [conf] fix default config --- halfapi/conf.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/halfapi/conf.py b/halfapi/conf.py index 7b17306..2003864 100644 --- a/halfapi/conf.py +++ b/halfapi/conf.py @@ -4,16 +4,18 @@ from os import environ import sys from configparser import ConfigParser -config = ConfigParser(defaults={ +default_config = { 'project': { 'host': '127.0.0.1', 'port': '8000', - 'secret': None, - 'base_dir': None, - 'production': False + 'secret': '' + 'base_dir': '' + 'production': '' } -}) +} +config = ConfigParser() +config.read_dict(default_config) config.read(filenames=['.halfapiconfig']) PROJECT_NAME = config.get('project', 'name')