Use web attribute
This commit is contained in:
@@ -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"):
|
||||||
|
|||||||
Reference in New Issue
Block a user