Skip to content

Commit

Permalink
Fix Chromecast warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 5, 2023
1 parent a09f98e commit a09524e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hass_win/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from atomicwrites import AtomicWriter
from colorlog import ColoredFormatter
from homeassistant import __main__, const, setup
from homeassistant.helpers import signal
from homeassistant.helpers import frame, signal
from homeassistant.loader import Integration
from homeassistant.util import package

Expand Down Expand Up @@ -161,7 +161,7 @@ def wrapper(integration: Integration):
mimetypes.add_type("text/css", ".css")
mimetypes.add_type("application/javascript", ".js")

# fix Windows depended core bugs
# fix Windows dependes core bugs
__main__.validate_os = lambda: None # Hass v2022.2+
os.fchmod = lambda *args: None
signal.async_register_signal_handling = lambda *args: None
Expand All @@ -184,5 +184,8 @@ def wrapper(integration: Integration):
socket.CMSG_LEN = lambda *args: None
socket.SCM_RIGHTS = 0

# fix Chromecast warning in logs (async_setup_platforms)
frame.report = lambda *args, **kwargs: None

if __name__ == "__main__":
sys.exit(__main__.main())

0 comments on commit a09524e

Please sign in to comment.