Skip to content

Commit

Permalink
Merge pull request #97 from jlebon/pr/validate-importer-response
Browse files Browse the repository at this point in the history
  • Loading branch information
jlebon authored Apr 17, 2020
2 parents b22b5f4 + c92a36e commit 56cd9a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions coreos-ostree-importer/send-ostree-import-request.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def send_ostree_import_request(args):
"target_repo": args.repo,
},
)
# validate_response(response)
validate_response(response)


def get_bucket_and_prefix(path):
Expand All @@ -92,8 +92,8 @@ def validate_response(response):
if response["status"].lower() == "failure":
# https://pagure.io/robosignatory/pull-request/38
if "failure-message" not in response:
raise Exception("Signing failed")
raise Exception(f"Signing failed: {response['failure-message']}")
raise Exception("Importing failed")
raise Exception(f"Importing failed: {response['failure-message']}")
assert response["status"].lower() == "success", str(response)


Expand Down

0 comments on commit 56cd9a0

Please sign in to comment.