Skip to content
Snippets Groups Projects
Unverified Commit 7e705704 authored by Casey's avatar Casey :recycle: Committed by Oliver Smith
Browse files

core: chroot: make ChrootType membership check work on python 3.10 (MR 2471)


You can't check enum membership with __contains__() on Python 3.10, poke
inside the enum instead.

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent 3592f9a2
Branches
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ class Chroot:
"riscv64",
]
if self.__type not in ChrootType:
if self.__type not in ChrootType._member_map_.values():
raise ValueError(f"Invalid chroot type: '{self.__type}'")
# A buildroot suffix must have a name matching one of alpines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment