mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-14 08:16:15 +01:00
13 lines
381 B
Python
13 lines
381 B
Python
from . import api
|
|
from .. import oscerr
|
|
|
|
|
|
def get_configuration_value(apiurl, option):
|
|
url_path = ["configuration"]
|
|
url_query = {}
|
|
root = api.get(apiurl, url_path, url_query)
|
|
node = api.find_node(root, "configuration", option)
|
|
if node is None or not node.text:
|
|
raise oscerr.APIError(f"Couldn't get configuration option '{option}'")
|
|
return node.text
|