Use web attribute

This commit is contained in:
1e9abhi1e10
2024-06-23 08:38:35 +05:30
parent 7803fa60f2
commit bd9592c19c

View File

@@ -490,8 +490,7 @@ class ePIC(ePICFirmware):
form_data.add_field('update.zip', open(file, 'rb'), filename='update.zip') form_data.add_field('update.zip', open(file, 'rb'), filename='update.zip')
# Send the POST request to the ePIC miner device # Send the POST request to the ePIC miner device
async with aiohttp.ClientSession() as session: async with self.web.post(f"http://{self.ip}:{self.port}/systemupdate", data=form_data) as response:
async with session.post(f"http://{self.ip}:{self.port}/systemupdate", data=form_data) as response:
if response.status == 200: if response.status == 200:
result = await response.json() result = await response.json()
if result.get("result"): if result.get("result"):