FIX: fix for initial startup not creating values for config.ini successfully

This commit is contained in:
evilhero 2017-11-25 13:40:34 -05:00
parent 40c945376a
commit d86f4c2cb5
1 changed files with 6 additions and 2 deletions

View File

@ -521,8 +521,12 @@ class Config(object):
myval = {'status': True, 'value': config.getboolean(section, inikey)}
except Exception:
if definition_type == str:
myval = {'status': True, 'value': config.get(section, inikey, raw=True)}
myval = {'status': False, 'value': None}
try:
myval = {'status': True, 'value': config.get(section, inikey, raw=True)}
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
myval = {'status': False, 'value': None}
else:
myval = {'status': False, 'value': None}
return myval
def _define(self, name):