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

[contrib/playerctl]: don't log when no player is found #838

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

ouuan
Copy link
Contributor

@ouuan ouuan commented Dec 17, 2021

playerctl status returns 1 when no player is found, which caused contrib/playerctl to log many times when there's no player.

`playerctl status` returns 1 when no player is found, which caused
contrib/playerctl to log many times when there's no player.
@tobi-wan-kenobi
Copy link
Owner

Thanks a lot for the improvement!

Alternatively, cli.util.execute() has a parameter to ignore errors (ignore_errors=True), but your solutions works great, as well.

@tobi-wan-kenobi tobi-wan-kenobi merged commit e590a3c into tobi-wan-kenobi:main Dec 17, 2021
@ouuan
Copy link
Contributor Author

ouuan commented Dec 17, 2021

Alternatively, cli.util.execute() has a parameter to ignore errors (ignore_errors=True), but your solutions works great, as well.

cli.util.execute with both ignore_errors=True and include_stderr=True doesn't return stderr when exit code is not zero. Is it expected?

@ouuan ouuan deleted the fix-playerctl-log branch December 17, 2021 11:07
@tobi-wan-kenobi
Copy link
Owner

Oh, that does sound like a bug :)

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.

None yet

2 participants