mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Fix QNAP fail to load (#144675)
* Update coordinator.py * Update coordinator.py @peternash * Update coordinator.py * Update coordinator.py * Update coordinator.py * Update coordinator.py
This commit is contained in:
parent
7464e3944e
commit
761bb65ac6
@ -6,6 +6,7 @@ from contextlib import contextmanager, nullcontext
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
import warnings
|
||||||
|
|
||||||
from qnapstats import QNAPStats
|
from qnapstats import QNAPStats
|
||||||
import urllib3
|
import urllib3
|
||||||
@ -37,7 +38,8 @@ def suppress_insecure_request_warning():
|
|||||||
Was added in here to solve the following issue, not being solved upstream.
|
Was added in here to solve the following issue, not being solved upstream.
|
||||||
https://github.com/colinodell/python-qnapstats/issues/96
|
https://github.com/colinodell/python-qnapstats/issues/96
|
||||||
"""
|
"""
|
||||||
with urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning):
|
with warnings.catch_warnings():
|
||||||
|
warnings.simplefilter("ignore", urllib3.exceptions.InsecureRequestWarning)
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user