Ensure that file closed after sending.

This commit is contained in:
Roman Telezhynskyi 2024-03-28 15:51:46 +02:00
parent 5a8111c9b1
commit 4a6fc76329

View File

@ -113,7 +113,8 @@ def upload_symbols(install_root, val_version, commit_hash, qt_version, clean=Fal
sym_file_name = os.path.basename(sym_file) sym_file_name = os.path.basename(sym_file)
url = f"https://{database}.bugsplat.com/post/bp/symbol/breakpadsymbols.php?appName={app_name}&appVer={app_version}&code_file={sym_file_name}" url = f"https://{database}.bugsplat.com/post/bp/symbol/breakpadsymbols.php?appName={app_name}&appVer={app_version}&code_file={sym_file_name}"
files = {'symbol_file': (f'{sym_file_name}', open(sym_file, 'rb'))} with open(sym_file, 'rb') as symbol_file:
files = {'symbol_file': (f'{sym_file_name}', symbol_file)}
response = requests.post(url, files=files) response = requests.post(url, files=files)
if response.status_code == 200: if response.status_code == 200: