Skip to content

Commit

Permalink
Remove impossible exception handling in youtube controller (#782)
Browse files Browse the repository at this point in the history
* Remove impossible exception handling in youtube controller

* Remove unused import
  • Loading branch information
emontnemery authored Jan 16, 2024
1 parent 4e9a345 commit 0346807
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pychromecast/controllers/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from . import BaseController
from ..const import MESSAGE_TYPE
from ..error import UnsupportedNamespace
from ..config import APP_YOUTUBE

YOUTUBE_NAMESPACE = "urn:x-cast:com.google.youtube.mdx"
Expand Down Expand Up @@ -83,11 +82,7 @@ def update_screen_id(self):
(send message will launch app if it is not running).
"""
self.status_update_event.clear()
# This gets the screenId but always throws. Couldn't find a better way.
try:
self.send_message({MESSAGE_TYPE: TYPE_GET_SCREEN_ID})
except UnsupportedNamespace:
pass
self.send_message({MESSAGE_TYPE: TYPE_GET_SCREEN_ID})
status = self.status_update_event.wait(10)
if not status:
_LOGGER.warning("Failed to update screen_id")
Expand Down

0 comments on commit 0346807

Please sign in to comment.