mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Fix github API call
This commit is contained in:
@ -211,7 +211,7 @@ def release(args):
|
|||||||
req = urllib.request.Request(
|
req = urllib.request.Request(
|
||||||
f'{uploads_url}/{id}/assets?name={package}',
|
f'{uploads_url}/{id}/assets?name={package}',
|
||||||
headers={'Content-Type': 'application/zip'} | auth_headers,
|
headers={'Content-Type': 'application/zip'} | auth_headers,
|
||||||
data=open('build/fmt/' + package, 'rb'), method='POST')
|
data=open('build/fmt/' + package, 'rb').read(), method='POST')
|
||||||
with urllib.request.urlopen(req) as response:
|
with urllib.request.urlopen(req) as response:
|
||||||
if response.status != 201:
|
if response.status != 201:
|
||||||
raise Exception(f'Failed to upload an asset '
|
raise Exception(f'Failed to upload an asset '
|
||||||
|
Reference in New Issue
Block a user