diff --git a/src/tablib/packages/dbfpy/header.py b/src/tablib/packages/dbfpy/header.py index ce46192c..3da49b8a 100644 --- a/src/tablib/packages/dbfpy/header.py +++ b/src/tablib/packages/dbfpy/header.py @@ -106,7 +106,7 @@ def fromStream(cls, stream): """Return header object from the stream.""" stream.seek(0) first_32 = stream.read(32) - if type(first_32) != bytes: + if not isinstance(first_32, bytes): _data = bytes(first_32, sys.getfilesystemencoding()) _data = first_32 (_cnt, _hdrLen, _recLen) = struct.unpack("