mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-09 22:06:47 +00:00
Better output for log uploading.
This commit is contained in:
parent
0da722a048
commit
02b3bce1a0
@ -15,8 +15,10 @@ LOGS_GLOB = os.path.normpath("logs/*.xml")
|
||||
|
||||
headers = { "Content-Type": "text/xml" }
|
||||
|
||||
for fn in glob.glob(LOGS_GLOB):
|
||||
print("Uploading {}…".format(fn), end="")
|
||||
file_list = glob.glob(LOGS_GLOB)
|
||||
print("Found {} logs to upload.".format(len(file_list)))
|
||||
for fn in file_list:
|
||||
print("Uploading {}…".format(fn), end="", flush=True)
|
||||
with open(fn, "rb") as f:
|
||||
r = requests.post(UPLOAD_URL, data=f, headers=headers)
|
||||
if r.status_code == 200:
|
||||
|
Loading…
Reference in New Issue
Block a user