Skip to content

Commit

Permalink
do not use is for int comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Nov 21, 2024
1 parent f956754 commit c3ec572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ cdef class device:
else:
with nogil:
n = hid_read(c_hid, cbuff, c_max_length)
if n is -1:
if n == -1:
raise IOError('read error')
res = list(cbuff[:n])
finally:
Expand Down

0 comments on commit c3ec572

Please sign in to comment.