Skip to content
This repository was archived by the owner on Jan 29, 2022. It is now read-only.

Commit 6975b5f

Browse files
committed
fix byte comparison
1 parent ca1ff5c commit 6975b5f

File tree

1 file changed

+1
-1
lines changed
  • streaming/language_support/python/pymongo_hadoop

1 file changed

+1
-1
lines changed

Diff for: streaming/language_support/python/pymongo_hadoop/input.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _read(self):
2626
data = size_bits + self.fh.read(size)
2727
if len(data) != size + 4:
2828
raise struct.error("Unable to cleanly read expected BSON Chunk; EOF, underful buffer or invalid object size.")
29-
if data[size + 4 - 1] != "\x00":
29+
if data[size + 4 - 1] != 0:
3030
raise InvalidBSON("Bad EOO in BSON Data")
3131
doc = BSON(data).decode(codec_options=STREAMING_CODEC_OPTIONS)
3232
return doc

0 commit comments

Comments
 (0)