Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove impossible exception handling in youtube controller #782

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

emontnemery
Copy link
Collaborator

The comment for the removed exception handling claims:

This gets the screenId but always throws

However, this is impossible, there's no case where we send a message and after that raise UnsupportedNamespace

@MartinHjelmare
Copy link
Contributor

The base controller can raise. Will that path never be taken?

@emontnemery
Copy link
Collaborator Author

The base controller can raise. Will that path never be taken?

Sure, that path can be taken, but it's not expected and we should not catch and ignore it.

The code I want to remove have this comment:

# This gets the screenId but always throws. Couldn't find a better way.

This is impossible, as explained in the PR description and on Discord; there's no case where BaseController.send_message first sends a message and after that raises UnsupportedNamespace. Maybe there was some other bug in pychromecast when that code was added forcing the author to add the workaround.

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@emontnemery emontnemery merged commit 0346807 into master Jan 16, 2024
1 check passed
@emontnemery emontnemery deleted the youtube_controller_tweak branch January 16, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants