fix for new configurations with no config.ini files

This commit is contained in:
evilhero 2020-01-13 13:36:01 -05:00
parent cad04c0e71
commit 5e2855cb51
1 changed files with 8 additions and 7 deletions

View File

@ -500,13 +500,14 @@ class Config(object):
except configparser.NoSectionError:
continue
else:
if k == 'CONFIG_VERSION':
config.remove_option('General', 'dbuser')
config.remove_option('General', 'dbpass')
config.remove_option('General', 'dbchoice')
config.remove_option('General', 'dbname')
elif k == 'MINIMAL_INI':
config.set(v[1], k.lower(), str(self.MINIMAL_INI))
if self.CONFIG_VERSION != 0:
if k == 'CONFIG_VERSION':
config.remove_option('General', 'dbuser')
config.remove_option('General', 'dbpass')
config.remove_option('General', 'dbchoice')
config.remove_option('General', 'dbname')
elif k == 'MINIMAL_INI':
config.set(v[1], k.lower(), str(self.MINIMAL_INI))
def read(self, startup=False):
self.config_vals()