Skip to content

Commit d3198e3

Browse files
committed
Adding exception to requests to openshot.org
1 parent 2a0dadc commit d3198e3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

installer/deploy.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,19 @@
217217
# Submit blog post (if it doesn't already exist) (in draft mode)
218218
auth = HTTPBasicAuth(os.getenv('OPENSHOT_ORG_USER'), os.getenv('OPENSHOT_ORG_PASS'))
219219
r = post("https://www.openshot.org/api/release/submit/", auth=auth, data={ "version": github_release.tag_name,
220-
"changelog": combined_log_markdown })
220+
"changelog": log_title + combined_log_markdown })
221221
if not r.ok:
222-
raise Exception("HTTP post to openshot.org/api/release/submit/ failed: %s (user: %s)" % (r.status_code, os.getenv('OPENSHOT_ORG_USER')))
222+
raise Exception("HTTP post to openshot.org/api/release/submit/ failed: %s (user: %s): %s" %
223+
(r.status_code, os.getenv('OPENSHOT_ORG_USER'),
224+
r.json().get('message', 'no error message found')))
223225
else:
224226
# Publish the release (make new version visible on openshot.org, and make blog post visible)
225227
auth = HTTPBasicAuth(os.getenv('OPENSHOT_ORG_USER'), os.getenv('OPENSHOT_ORG_PASS'))
226228
r = post("https://www.openshot.org/api/release/publish/", auth=auth, data={"version": github_release.tag_name })
227229
if not r.ok:
228-
raise Exception("HTTP post to openshot.org/api/release/publish/ failed: %s (user: %s)" % (r.status_code, os.getenv('OPENSHOT_ORG_USER')))
230+
raise Exception("HTTP post to openshot.org/api/release/publish/ failed: %s (user: %s): %s" %
231+
(r.status_code, os.getenv('OPENSHOT_ORG_USER'),
232+
r.json().get('message', 'no error message found')))
229233

230234
for repo_name in repo_names:
231235
# If NO release is found, create a new one

0 commit comments

Comments
 (0)