diff --git a/hid.pyx b/hid.pyx index cb05e72..ea93696 100644 --- a/hid.pyx +++ b/hid.pyx @@ -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: