diff options
| author | jvoisin | 2016-08-29 22:12:40 +0200 |
|---|---|---|
| committer | jvoisin | 2016-08-29 22:12:40 +0200 |
| commit | 64b667be5d6b36d17839482593ccf2207af14ac9 (patch) | |
| tree | 8ab14777fc5d6a8d9793c2a460ae9e4ea14c2909 /libmat/exiftool.py | |
| parent | a3c289dea1ceebcc2e624d002ab31deb851a7e3a (diff) | |
Python3, now with less features
I want to release a new version ASAP, so lets ditch some features for
now.
Diffstat (limited to 'libmat/exiftool.py')
| -rw-r--r-- | libmat/exiftool.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmat/exiftool.py b/libmat/exiftool.py index 83513b4..3bc18b0 100644 --- a/libmat/exiftool.py +++ b/libmat/exiftool.py | |||
| @@ -47,9 +47,10 @@ class ExiftoolStripper(parser.GenericParser): | |||
| 47 | field name : value | 47 | field name : value |
| 48 | field name : value | 48 | field name : value |
| 49 | """ | 49 | """ |
| 50 | output = str(subprocess.Popen(['exiftool', self.filename], | 50 | output = subprocess.Popen(['exiftool', self.filename], |
| 51 | stdout=subprocess.PIPE).communicate()[0]) | 51 | stdout=subprocess.PIPE).communicate()[0] |
| 52 | meta = {} | 52 | meta = {} |
| 53 | output = output.decode('utf-8') | ||
| 53 | for i in output.split('\n')[:-1]: # chop last char ('\n') | 54 | for i in output.split('\n')[:-1]: # chop last char ('\n') |
| 54 | key = i.split(':')[0].strip() | 55 | key = i.split(':')[0].strip() |
| 55 | if key not in self.allowed: | 56 | if key not in self.allowed: |
