Skip to content

Commit

Permalink
Fix python deploy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 26, 2017
1 parent e7ef9f5 commit 6abad9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/ci/plugin_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def main(parameters, arguments):
data = json.dumps({"tag_name": parameters.release})
conn.request('POST', '/repos/{repo_slug}/releases'.format(repo_slug=os.environ['TRAVIS_REPO_SLUG']), body=data, headers=headers)
response = conn.getresponse()
release = json.load(response)
release = json.loads(response.read().decode())
print(release)

conn = http.client.HTTPSConnection('uploads.github.com')
headers['Content-Type'] = 'application/zip'
url='{}?name={}'.format(release['upload_url'][:-13], filename)
print('Upload to {}'.format(url))

with open(filename, 'r') as f:
with open(filename, 'rb') as f:
conn.request('POST', url, f, headers)

print(conn.getresponse().read())
Expand Down

0 comments on commit 6abad9a

Please sign in to comment.