def __update_config_attr(attr, value, section): if isinstance(value, list): value = json.dumps(value) if attr not in ConfigHandler[section].keys( ) or ConfigHandler[section][attr] != value: ConfigHandler.set(section, key=attr, value=value, overwrite=True)
def __update_config_attr(attr, value, section): if isinstance(value, list): value = json.dumps(value) if attr not in ConfigHandler[section].keys() or ConfigHandler[section][attr] != value: # print('updating attribute {0}:{1}..'.format(section, attr)) # print(' {0} -> {1}'.format(repr(ConfigHandler[section][attr]), repr(value))) ConfigHandler.set(section, key=attr, value=value, overwrite=True)