Commits

Matt Chaput  committed 5b0c96c

Moved emptybytes constant into system module.

  • Participants
  • Parent commits 12ad088

Comments (0)

Files changed (2)

File src/whoosh/support/dawg.py

                            bytes_type, text_type, izip)
 from whoosh.filedb.structfile import StructFile
 from whoosh.system import (_INT_SIZE, pack_byte, pack_int, pack_uint,
-                           pack_long)
+                           pack_long, emptybytes)
 from whoosh.util import utf8encode, utf8decode, varint
 
 
     pass
 
 
-emptybytes = b("")
-
 ARC_LAST = 1
 ARC_ACCEPT = 2
 ARC_STOP = 4

File src/whoosh/system.py

 unpack_uint = _uint_struct.unpack
 unpack_long = _long_struct.unpack
 unpack_float = _float_struct.unpack
+
+if sys.version_info[0] < 3:
+    emptybytes = ""
+else:
+    emptybytes = "".encode("latin-1")
+
+