From 33b01af78aa27fb0a8acc28aa27260dec0b83985 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 1 Sep 2024 02:21:34 -0400 Subject: [PATCH] doorcontrol: Explicity cast Credential.bits to Bits, as Bitstream is not hashable --- doorcontrol/hid/Credential.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doorcontrol/hid/Credential.py b/doorcontrol/hid/Credential.py index fc10d92..333c479 100644 --- a/doorcontrol/hid/Credential.py +++ b/doorcontrol/hid/Credential.py @@ -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":