From d3198e38cbb156175df5e50f3d02cd25fe224a83 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Wed, 24 Feb 2021 10:33:34 -0600 Subject: [PATCH] Adding exception to requests to openshot.org --- installer/deploy.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/installer/deploy.py b/installer/deploy.py index 2a17c150..d92fe044 100644 --- a/installer/deploy.py +++ b/installer/deploy.py @@ -217,15 +217,19 @@ if __name__ == "__main__": # Submit blog post (if it doesn't already exist) (in draft mode) auth = HTTPBasicAuth(os.getenv('OPENSHOT_ORG_USER'), os.getenv('OPENSHOT_ORG_PASS')) r = post("https://www.openshot.org/api/release/submit/", auth=auth, data={ "version": github_release.tag_name, - "changelog": combined_log_markdown }) + "changelog": log_title + combined_log_markdown }) if not r.ok: - raise Exception("HTTP post to openshot.org/api/release/submit/ failed: %s (user: %s)" % (r.status_code, os.getenv('OPENSHOT_ORG_USER'))) + raise Exception("HTTP post to openshot.org/api/release/submit/ failed: %s (user: %s): %s" % + (r.status_code, os.getenv('OPENSHOT_ORG_USER'), + r.json().get('message', 'no error message found'))) else: # Publish the release (make new version visible on openshot.org, and make blog post visible) auth = HTTPBasicAuth(os.getenv('OPENSHOT_ORG_USER'), os.getenv('OPENSHOT_ORG_PASS')) r = post("https://www.openshot.org/api/release/publish/", auth=auth, data={"version": github_release.tag_name }) if not r.ok: - raise Exception("HTTP post to openshot.org/api/release/publish/ failed: %s (user: %s)" % (r.status_code, os.getenv('OPENSHOT_ORG_USER'))) + raise Exception("HTTP post to openshot.org/api/release/publish/ failed: %s (user: %s): %s" % + (r.status_code, os.getenv('OPENSHOT_ORG_USER'), + r.json().get('message', 'no error message found'))) for repo_name in repo_names: # If NO release is found, create a new one -- GitLab