doorcontrol: Explicity cast Credential.bits to Bits, as Bitstream is not hashable
All checks were successful
Ruff / ruff (push) Successful in 36s
Test / test (push) Successful in 3m7s

This commit is contained in:
Adam Goldsmith 2024-09-01 02:21:34 -04:00
parent f29010469a
commit 33b01af78a

View File

@ -34,7 +34,7 @@ class Credential:
)
bits[6] = bits[7:19].count(1) % 2 # even parity
bits[31] = bits[19:31].count(0) % 2 # odd parity
return cls(bits)
return cls(bitstring.Bits(bits))
@classmethod
def from_hex(cls, hex_code: str) -> "Credential":