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

Lower close() logging level to debug when the process is already terminated #180

Merged

Conversation

nmaggioni
Copy link
Contributor

As of HA 2024.10.x and up to the current 2024.11 I'm getting a warning on startup:

WARNING (MainThread) [haffmpeg.core] FFmpeg isn't running!

It seems that when checking the FFmpeg version the process exits earlier than #173 tries to close it, generating that warning.
The check introduced by this PR may seem a bit redundant, but the only alternative I can think of is adding a flag to close() to allow for already-exited processes.

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.

I'd instead just lower the warning to debug level.

@nmaggioni nmaggioni changed the title Close process in tools functions only if needed Lower close() logging level to debug when the process is already terminated Nov 7, 2024
@nmaggioni
Copy link
Contributor Author

Makes sense, done.

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.

Thanks!

@MartinHjelmare MartinHjelmare merged commit 3a3e661 into home-assistant-libs:master Nov 8, 2024
1 check passed
@MartinHjelmare
Copy link
Contributor

Released here: https://pypi.org/project/ha-ffmpeg/3.2.2/

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