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
6 changes: 5 additions & 1 deletion exiftool.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

from __future__ import unicode_literals

import select
import sys
import subprocess
import os
Expand Down Expand Up @@ -223,7 +224,10 @@ def execute(self, *params):
output = b""
fd = self._process.stdout.fileno()
while not output[-32:].strip().endswith(sentinel):
output += os.read(fd, block_size)
inputready,outputready,exceptready = select.select([fd],[],[])
for i in inputready:
if i == fd:
output += os.read(fd, block_size)
return output.strip()[:-len(sentinel)]

def execute_json(self, *params):
Expand Down