Skip to content

Commit

Permalink
use isinstance in builtin crc32 (dpkp#2329)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlxB2 committed Aug 8, 2023
1 parent f984984 commit d920108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kafka/record/_crc32c.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def crc_update(crc, data):
Returns:
32-bit updated CRC-32C as long.
"""
if type(data) != array.array or data.itemsize != 1:
if not isinstance(data, array.array) or data.itemsize != 1:
buf = array.array("B", data)
else:
buf = data
Expand Down

0 comments on commit d920108

Please sign in to comment.