First version of BackTrace upload python script.

This commit is contained in:
NissimHadar 2019-04-30 12:27:08 -07:00
parent 9261df5c24
commit dd1525c9b7

18
hifi_backtrace_post.py Normal file
View file

@ -0,0 +1,18 @@
# Parameters:
# 1 - $BACKTRACE_UPLOAD_TOKEN
# 2 - $SYMBOLS_ARCHIVE
# 3 - $RELEASE_NUMBER
#
import sys
import urllib.request
import urllib.parse
post_headers = {}
post_headers['Content-Type'] = 'application/json'
post_headers['Expect'] = ''
post_url = 'https://highfidelity.sp.backtrace.io:6098/post?format=symbols&token=' + sys.argv[1] + '&upload_file=' + sys.argv[2] + '&tag=' + sys.argv[3]
post_data = open(sys.argv[1], 'rb')
post_request = urllib.request.Request(post_url, post_data, post_headers)
post_response = urllib.request.urlopen(post_request)