def get(self): cfg: CfgConfig.Value res: typing.Dict[str, typing.Dict[str, typing.Any]] = {} addCrypt = self.is_admin() for cfg in CfgConfig.enumerate(): # Skip removed configuration values, even if they are in database logger.debug('Key: %s, val: %s', cfg.section(), cfg.key()) if cfg.key() in REMOVED.get(cfg.section(), ()): continue if cfg.isCrypted() is True and addCrypt is False: continue # add section if it do not exists if cfg.section() not in res: res[cfg.section()] = {} res[cfg.section()][cfg.key()] = { 'value': cfg.get(), 'crypt': cfg.isCrypted(), 'longText': cfg.isLongText(), 'type': cfg.getType(), 'params': cfg.getParams() } logger.debug('Configuration: %s', res) return res
def get(self): res = {} addCrypt = self.is_admin() for cfg in cfgConfig.enumerate(): if cfg.isCrypted() is True and addCrypt is False: continue # add section if it do not exists if cfg.section() not in res: res[cfg.section()] = {} res[cfg.section()][cfg.key()] = { 'value': cfg.get(), 'crypt': cfg.isCrypted(), 'longText': cfg.isLongText(), 'type': cfg.getType() } logger.debug('Configuration: {0}'.format(res)) return res
def get(self): res = {} addCrypt = self.is_admin() for cfg in cfgConfig.enumerate(): if cfg.isCrypted() is True and addCrypt is False: continue # add section if it do not exists if cfg.section() not in res: res[cfg.section()] = {} res[cfg.section()][cfg.key()] = { "value": cfg.get(), "crypt": cfg.isCrypted(), "longText": cfg.isLongText(), "type": cfg.getType(), } logger.debug("Configuration: {0}".format(res)) return res
def get(self): res = {} addCrypt = self.is_admin() for cfg in cfgConfig.enumerate(): if cfg.isCrypted() is True and addCrypt is False: continue # add section if it do not exists if cfg.section() not in res: res[cfg.section()] = {} res[cfg.section()][cfg.key()] = { 'value': cfg.get(), 'crypt': cfg.isCrypted(), 'longText': cfg.isLongText(), 'type': cfg.getType(), 'params': cfg.getParams() } logger.debug('Configuration: {0}'.format(res)) return res
def get(self): res = {} addCrypt = self.is_admin() for cfg in cfgConfig.enumerate(): # Skip removed configuration values, even if they are in database logger.debug('Key: %s, val: %s', cfg.section(), cfg.key()); if cfg.key() in REMOVED.get(cfg.section(), ()): continue if cfg.isCrypted() is True and addCrypt is False: continue # add section if it do not exists if cfg.section() not in res: res[cfg.section()] = {} res[cfg.section()][cfg.key()] = { 'value': cfg.get(), 'crypt': cfg.isCrypted(), 'longText': cfg.isLongText(), 'type': cfg.getType(), 'params': cfg.getParams() } logger.debug('Configuration: {0}'.format(res)) return res