make hardware_service works on linux

This commit is contained in:
Alex Bezdieniezhnykh
2025-05-31 17:47:58 +03:00
parent 93e081c93d
commit 06878e7656
2 changed files with 20 additions and 50 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ class ApiClient:
print(f"Upload fail: {e}")
def load_bytes(self, filename, folder):
hardware = get_hardware_info()
hardware_str = get_hardware_info()
if self.token is None:
self.login()
@@ -73,7 +73,7 @@ class ApiClient:
payload = json.dumps(
{
"password": self.credentials.password,
"hardware": hardware.to_json_object(),
"hardware": hardware_str,
"fileName": filename
}, indent=4)
response = requests.post(url, data=payload, headers=headers, stream=True)