Skip to content

Commit 8313107

Browse files
authored
Merge pull request #35 from adafruit/patch-fix
Linted
2 parents cabed2f + 6e06d97 commit 8313107

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_azureiot/hmac.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,7 @@ def sha_update(sha_info: dict, buffer: Union[bytes, bytearray]) -> None:
321321

322322
if sha_info["local"]:
323323
i = SHA_BLOCKSIZE - sha_info["local"]
324-
if i > count:
325-
i = count
324+
i = min(i, count)
326325

327326
# copy buffer
328327
for x in enumerate(buffer[buffer_idx : buffer_idx + i]):

0 commit comments

Comments
 (0)