Fix compatibility with zeroconf >= 0.73

Fixes #2038 (fix compatibility with newer zeroconf)
This commit is contained in:
Kovid Goyal 2023-10-01 15:08:59 +05:30
parent 2858397017
commit 5d8d85c649
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2175,6 +2175,8 @@ def monkeypatch_zeroconf():
# "monkeypatch" zeroconf with a function without the check
try:
from zeroconf._utils.name import service_type_name
# zeroconf 0.73 uses an lru cache so we need __wrapped__
service_type_name = getattr(service_type_name, '__wrapped__', service_type_name)
service_type_name.__kwdefaults__['strict'] = False
except ImportError:
import zeroconf