Skip to content

Commit 86d7244

Browse files
committed
Merge pull request 15 smarnach#15
1 parent 01f8ed2 commit 86d7244

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ Date (Timezone) | Version | Comment
88
07/17/2019 12:50:20 AM (PDT) | 0.1 | Convert leading spaces to tabs
99
07/17/2019 12:52:33 AM (PDT) | 0.1.1 | Merge [Pull request #10 "add copy_tags method"](https://github.com/smarnach/pyexiftool/pull/10) by [Maik Riechert (letmaik) Cambridge, UK](https://github.com/letmaik) on May 28, 2014<br> *This adds a small convenience method to copy any tags from one file to another. I use it for several month now and it works fine for me.*
1010
07/17/2019 01:05:37 AM (PDT) | 0.1.2 | Merge [Pull request #25 "Added option for keeping print conversion active. #25"](https://github.com/smarnach/pyexiftool/pull/25) by [Bernhard Bliem (bbliem)](https://github.com/bbliem) on Jan 17, 2019<br> *For some tags, disabling print conversion (as was the default before) would not make much sense. For example, if print conversion is deactivated, the value of the Composite:LensID tag could be reported as something like "8D 44 5C 8E 34 3C 8F 0E". It is doubtful whether this is useful here, as we would then need to look up what this means in a table supplied with exiftool. We would probably like the human-readable value, which is in this case "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED".*<br>*Disabling print conversion makes sense for a lot of tags (e.g., it's nicer to get as the exposure time not the string "1/2" but the number 0.5). In such cases, even if we enable print conversion, we can disable it for individual tags by appending a # symbol to the tag name.*
11-
07/17/2019 01:20:15 AM (PDT) | 0.1.3 | Merge with slight modifications to variable names for clarity (Kevin Mak) [Pull request #27 "Add "shell" keyword argument to ExifTool initialization"](https://github.com/smarnach/pyexiftool/pull/27) by [Douglas Lassance (douglaslassance) Los Angeles, CA](https://github.com/douglaslassance) on 5/29/2019<br>*On Windows this will allow to run exiftool without showing the DOS shell.*<br>**This might break Linux but I don't know for sure**<br>Alternative source location with only this patch: https://github.com/blurstudio/pyexiftool/tree/shell-option
11+
07/17/2019 01:20:15 AM (PDT) | 0.1.3 | Merge with slight modifications to variable names for clarity (sylikc) [Pull request #27 "Add "shell" keyword argument to ExifTool initialization"](https://github.com/smarnach/pyexiftool/pull/27) by [Douglas Lassance (douglaslassance) Los Angeles, CA](https://github.com/douglaslassance) on 5/29/2019<br>*On Windows this will allow to run exiftool without showing the DOS shell.*<br>**This might break Linux but I don't know for sure**<br>Alternative source location with only this patch: https://github.com/blurstudio/pyexiftool/tree/shell-option
1212
07/17/2019 01:24:32 AM (PDT) | 0.1.4 | Merge [Pull request #19 "Correct dependency for building an RPM."](https://github.com/smarnach/pyexiftool/pull/19) by [Achim Herwig (Achimh3011) Munich, Germany](https://github.com/Achimh3011) on Aug 25, 2016<br>**I'm not sure if this is entirely necessary, but merging it anyways**
13-
14-
15-
13+
07/17/2019 02:09:40 AM (PDT) | 0.1.5 | Merge [Pull request #15 "handling Errno:11 Resource temporarily unavailable"](https://github.com/smarnach/pyexiftool/pull/15) by [shoyebi](https://github.com/shoyebi) on Jun 12, 2015
1614

1715

exiftool.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
from __future__ import unicode_literals
5757

58+
import select
5859
import sys
5960
import subprocess
6061
import os
@@ -242,7 +243,13 @@ def execute(self, *params):
242243
output = b""
243244
fd = self._process.stdout.fileno()
244245
while not output[-32:].strip().endswith(sentinel):
245-
output += os.read(fd, block_size)
246+
#output += os.read(fd, block_size)
247+
248+
# not sure if this works on windows
249+
inputready,outputready,exceptready = select.select([fd],[],[])
250+
for i in inputready:
251+
if i == fd:
252+
output += os.read(fd, block_size)
246253
return output.strip()[:-len(sentinel)]
247254

248255
def execute_json(self, *params):

0 commit comments

Comments
 (0)