more curl debugging

This commit is contained in:
jobevers 2017-02-22 15:24:19 -06:00
parent 0c77644861
commit 9e7ca7c9f8

View file

@ -92,9 +92,13 @@ def upload_asset(release, asset_to_upload, token):
# #
# TODO: actually set the content type # TODO: actually set the content type
cmd = [ cmd = [
'curl', '-sS', '-X', 'POST', '-u', ':{}'.format(os.environ['GH_TOKEN']), 'curl',
'-sS',
'-X', 'POST',
'-u', ':{}'.format(os.environ['GH_TOKEN']),
'--header', 'Content-Type:application/octet-stream', '--header', 'Content-Type:application/octet-stream',
'--data-binary', '@{}'.format(asset_to_upload), upload_uri '--data-binary', '@{}'.format(asset_to_upload),
upload_uri
] ]
print 'Calling curl:' print 'Calling curl:'
print cmd print cmd
@ -105,9 +109,9 @@ def upload_asset(release, asset_to_upload, token):
if stderr: if stderr:
print 'stderr output from curl:' print 'stderr output from curl:'
print stderr print stderr
output = json.loads(stdout)
print 'stdout from curl:' print 'stdout from curl:'
print stdout print stdout
output = json.loads(stdout)
if 'errors' in output: if 'errors' in output:
raise Exception(output) raise Exception(output)
else: else:
@ -128,3 +132,7 @@ if __name__ == '__main__':
sys.exit(main()) sys.exit(main())
else: else:
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
"my name = ﷽"