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 authored and bradenneal1 committed May 16, 2024
1 parent f0167cd commit 0b481a7
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 0b481a7

Please sign in to comment.