Update from upstream #11

Closed
soksanichenko wants to merge 158 commits from a8_updated into a8
2 changed files with 10 additions and 9 deletions
Showing only changes of commit a1ebd234a4 - Show all commits

View File

@ -157,14 +157,15 @@ def update_compose_url(compose_dir, conf):
compose_id = f.read()
authentication = get_authentication(conf)
cts_url = conf.get("cts_url", None)
url = os.path.join(cts_url, "api/1/composes", compose_id)
tp = conf.get("translate_paths", None)
compose_url = translate_path_raw(tp, compose_dir)
data = {
"action": "set_url",
"compose_url": compose_url,
}
return requests.patch(url, json=data, auth=authentication)
if cts_url:
url = os.path.join(cts_url, "api/1/composes", compose_id)
tp = conf.get("translate_paths", None)
compose_url = translate_path_raw(tp, compose_dir)
data = {
"action": "set_url",
"compose_url": compose_url,
}
return requests.patch(url, json=data, auth=authentication)
def get_compose_dir(

View File

@ -330,7 +330,7 @@ def main():
)
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)
errors, warnings = pungi.checks.validate(conf, offline=False)