Skip to content

camera, transport: Fix enum value checks on Python < 3.12. - #31

Merged
iabdalkader merged 2 commits into
masterfrom
fix_enum_contains
Nov 8, 2026
Merged

iabdalkader merged 2 commits into
masterfrom
fix_enum_contains

Conversation

@iabdalkader

Copy link
Copy Markdown
Member

No description provided.

Before Python 3.12, using "in" on an Enum class with a value that is not
a member raises TypeError instead of returning False. Look the value up
and catch ValueError instead.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
An unknown status raised ValueError while building the message instead
of OMVException, so the caller exited instead of resyncing.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@iabdalkader iabdalkader changed the title Fix enum value checks on Python < 3.12 camera, transport: Fix enum value checks on Python < 3.12. Nov 8, 2026
@iabdalkader
iabdalkader merged commit 9df56ff into master Nov 8, 2026
2 of 3 checks passed
@iabdalkader
iabdalkader deleted the fix_enum_contains branch November 8, 2026 11:57
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.

1 participant