提交 d3198e38 编写于 作者: J Jonathan Thomas

Adding exception to requests to openshot.org

上级 2a0dadc6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册