Update from upstream #11
@ -157,14 +157,15 @@ def update_compose_url(compose_dir, conf):
|
|||||||
compose_id = f.read()
|
compose_id = f.read()
|
||||||
authentication = get_authentication(conf)
|
authentication = get_authentication(conf)
|
||||||
cts_url = conf.get("cts_url", None)
|
cts_url = conf.get("cts_url", None)
|
||||||
url = os.path.join(cts_url, "api/1/composes", compose_id)
|
if cts_url:
|
||||||
tp = conf.get("translate_paths", None)
|
url = os.path.join(cts_url, "api/1/composes", compose_id)
|
||||||
compose_url = translate_path_raw(tp, compose_dir)
|
tp = conf.get("translate_paths", None)
|
||||||
data = {
|
compose_url = translate_path_raw(tp, compose_dir)
|
||||||
"action": "set_url",
|
data = {
|
||||||
"compose_url": compose_url,
|
"action": "set_url",
|
||||||
}
|
"compose_url": compose_url,
|
||||||
return requests.patch(url, json=data, auth=authentication)
|
}
|
||||||
|
return requests.patch(url, json=data, auth=authentication)
|
||||||
|
|
||||||
|
|
||||||
def get_compose_dir(
|
def get_compose_dir(
|
||||||
|
@ -330,7 +330,7 @@ def main():
|
|||||||
)
|
)
|
||||||
|
|
||||||
rv = Compose.update_compose_url(compose_dir, conf)
|
rv = Compose.update_compose_url(compose_dir, conf)
|
||||||
if not rv.ok:
|
if rv and not rv.ok:
|
||||||
logger.error("CTS compose_url update failed with the error: %s" % rv.text)
|
logger.error("CTS compose_url update failed with the error: %s" % rv.text)
|
||||||
|
|
||||||
errors, warnings = pungi.checks.validate(conf, offline=False)
|
errors, warnings = pungi.checks.validate(conf, offline=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user