Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions exiftool/exiftool.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ def _read_fd_endswith(fd, b_endswith: bytes, block_size: int) -> bytes:
else: # pytest-cov:windows: no cover
# this does NOT work on windows... and it may not work on other systems... in that case, put more things to use the original code above
inputready, outputready, exceptready = select.select([fd], [], [])
for i in inputready:
if i == fd:
output_list.append(os.read(fd, block_size))
if fd in inputready:
data = os.read(fd, block_size)
if len(data) == 0:
raise Exception("unexpected EOF from exiftool")
output_list.append(data)

return b"".join(output_list)

Expand Down