Skip to content

Commit 2a0dadc

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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

installer/deploy.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,16 @@
216216

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'))
219-
post("http://www.openshot.org/api/release/submit/", auth=auth, data={ "version": github_release.tag_name,
219+
r = post("https://www.openshot.org/api/release/submit/", auth=auth, data={ "version": github_release.tag_name,
220220
"changelog": combined_log_markdown })
221+
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')))
221223
else:
222224
# Publish the release (make new version visible on openshot.org, and make blog post visible)
223225
auth = HTTPBasicAuth(os.getenv('OPENSHOT_ORG_USER'), os.getenv('OPENSHOT_ORG_PASS'))
224-
post("http://www.openshot.org/api/release/publish/", auth=auth, data={"version": github_release.tag_name })
226+
r = post("https://www.openshot.org/api/release/publish/", auth=auth, data={"version": github_release.tag_name })
227+
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')))
225229

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

0 commit comments

Comments
 (0)