Skip to content

Commit

Permalink
handling Errno:9 Resource temporarily unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
shoyebi committed Jun 12, 2015
1 parent 3db3764 commit b1e517f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion exiftool.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,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

0 comments on commit b1e517f

Please sign in to comment.