diff --git a/.deploy/create_release.py b/.deploy/create_release.py index da700e87..19031bb3 100755 --- a/.deploy/create_release.py +++ b/.deploy/create_release.py @@ -150,13 +150,20 @@ def main(): for release_file in release_files: _, filename=os.path.split(release_file) headers['Content-Type']='text/plain' +# headers['Transfer-Encoding']='gzip' url='{release_url}?name={filename}'.format(release_url=release['upload_url'][:-13], filename=filename) print('Upload to {}'.format(url)) with open(release_file, 'rb') as f: conn.request('POST', url, f, headers) - conn.getresponse().read() + response = conn.getresponse() + result = response.read() + if response.status != 201: + print('Failed to upload filename {filename}'.format(filename=filename)) + print('Github API replied:') + print('{} {}'.format(response.status, response.reason)) + print(repr(json.loads(result.decode()))) if __name__ == "__main__": diff --git a/.travis.yml b/.travis.yml index 6b61df9f..a3cefb83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python python: - - 3.6 + - 3.5 # run on Travis container-based infrastructure dist: trusty