Browse Source

ota.py: don't use deprecated zeroconf attrs (#2299)

Also bump zeroconf to the version used by PIO
mcspr-patch-1
Max Prokhorov 4 years ago
committed by GitHub
parent
commit
33ff98c2c6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions
  1. +4
    -2
      code/ota.py
  2. +1
    -1
      code/requirements.txt

+ 4
- 2
code/ota.py View File

@ -22,7 +22,7 @@ import zeroconf
# ------------------------------------------------------------------------------- # -------------------------------------------------------------------------------
__version__ = (0, 4, 1)
__version__ = (0, 4, 2)
DESCRIPTION = "ESPurna OTA Manager v{}".format(".".join(str(x) for x in __version__)) DESCRIPTION = "ESPurna OTA Manager v{}".format(".".join(str(x) for x in __version__))
DISCOVERY_TIMEOUT = 10 DISCOVERY_TIMEOUT = 10
@ -113,9 +113,11 @@ class Listener:
return return
hostname = info.server.split(".")[0] hostname = info.server.split(".")[0]
addresses = info.parsed_addresses()
device = { device = {
"hostname": hostname.upper(), "hostname": hostname.upper(),
"ip": socket.inet_ntoa(info.address),
"ip": addresses[0] if addresses else info.host,
"mac": "", "mac": "",
"app_name": "", "app_name": "",
"app_version": "", "app_version": "",


+ 1
- 1
code/requirements.txt View File

@ -1,2 +1,2 @@
ifaddr==0.1.6 ifaddr==0.1.6
zeroconf==0.24.0
zeroconf==0.26.0

Loading…
Cancel
Save