Retrieve config value. :param category: name of category, or plugin :param option: config option :param section: 'plugin' or 'core' :return: config value as string
(self, category, option, section="core")
| 123 | |
| 124 | @permission(PERMS.SETTINGS) |
| 125 | def getConfigValue(self, category, option, section="core"): |
| 126 | """Retrieve config value. |
| 127 | |
| 128 | :param category: name of category, or plugin |
| 129 | :param option: config option |
| 130 | :param section: 'plugin' or 'core' |
| 131 | :return: config value as string |
| 132 | """ |
| 133 | if section == "core": |
| 134 | value = self.core.config[category][option] |
| 135 | else: |
| 136 | value = self.core.config.getPlugin(category, option) |
| 137 | |
| 138 | return str(value) if not isinstance(value, basestring) else value |
| 139 | |
| 140 | @permission(PERMS.SETTINGS) |
| 141 | def setConfigValue(self, category, option, value, section="core"): |