mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix compatibility with zeroconf >= 0.73
Fixes #2038 (fix compatibility with newer zeroconf)
This commit is contained in:
parent
2858397017
commit
5d8d85c649
@ -2175,6 +2175,8 @@ def monkeypatch_zeroconf():
|
|||||||
# "monkeypatch" zeroconf with a function without the check
|
# "monkeypatch" zeroconf with a function without the check
|
||||||
try:
|
try:
|
||||||
from zeroconf._utils.name import service_type_name
|
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
|
service_type_name.__kwdefaults__['strict'] = False
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import zeroconf
|
import zeroconf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user