Skip to content

Commit

Permalink
upload-file-to-url should print file size in MB
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266142

Reviewed by Jonathan Bedard.

Files being uploaded are several hundred MBs, so better to print the size in MB.

* Tools/Scripts/upload-file-to-url:

Canonical link: https://commits.webkit.org/271937@main
  • Loading branch information
aj062 committed Dec 12, 2023
1 parent 636cfab commit 952dc0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/Scripts/upload-file-to-url
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def upload(filename, url, max_attempts=3):
print(f'Error: missing url, either pass --url or set UPLOAD_URL environment variable.')
return -1

filesize = os.stat(filename).st_size // 1024 ;
print(f'Uploading {filename}, size: {filesize} KB')
filesize = os.stat(filename).st_size / 1024 / 1024;
print(f'Uploading {filename}, size: {filesize:.2f} MB')

with open(filename, 'rb') as f:
try:
Expand Down

0 comments on commit 952dc0f

Please sign in to comment.