MCPcopy Index your code
hub / github.com/pyload/pyload / getConfigValue

Method getConfigValue

module/Api.py:125–138  ·  view source on GitHub ↗

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")

Source from the content-addressed store, hash-verified

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"):

Callers

nothing calls this directly

Calls 1

getPluginMethod · 0.45

Tested by

no test coverage detected