diff options
Diffstat (limited to 'libmat')
| -rw-r--r-- | libmat/archive.py | 4 | ||||
| -rw-r--r-- | libmat/exiftool.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libmat/archive.py b/libmat/archive.py index 12ca55e..cfc818d 100644 --- a/libmat/archive.py +++ b/libmat/archive.py | |||
| @@ -194,9 +194,9 @@ class ZipStripper(GenericArchiveStripper): | |||
| 194 | zinfo = zipfile.ZipInfo(item.filename, date_time=ZIP_EPOCH) | 194 | zinfo = zipfile.ZipInfo(item.filename, date_time=ZIP_EPOCH) |
| 195 | zinfo.compress_type = zipfile.ZIP_DEFLATED | 195 | zinfo.compress_type = zipfile.ZIP_DEFLATED |
| 196 | zinfo.create_system = 3 # Linux | 196 | zinfo.create_system = 3 # Linux |
| 197 | zinfo.comment = '' | 197 | zinfo.comment = b'' |
| 198 | with open(path, 'r') as f: | 198 | with open(path, 'r') as f: |
| 199 | zipout.writestr(zinfo, f.read()) | 199 | zipout.writestr(zinfo, str(f.read())) |
| 200 | # os.utime(path, (ZIP_EPOCH_SECONDS, ZIP_EPOCH_SECONDS)) | 200 | # os.utime(path, (ZIP_EPOCH_SECONDS, ZIP_EPOCH_SECONDS)) |
| 201 | # zipout.write(path, item.filename) | 201 | # zipout.write(path, item.filename) |
| 202 | zipin.close() | 202 | zipin.close() |
diff --git a/libmat/exiftool.py b/libmat/exiftool.py index efe6002..83513b4 100644 --- a/libmat/exiftool.py +++ b/libmat/exiftool.py | |||
| @@ -47,8 +47,8 @@ class ExiftoolStripper(parser.GenericParser): | |||
| 47 | field name : value | 47 | field name : value |
| 48 | field name : value | 48 | field name : value |
| 49 | """ | 49 | """ |
| 50 | output = subprocess.Popen(['exiftool', self.filename], | 50 | output = str(subprocess.Popen(['exiftool', self.filename], |
| 51 | stdout=subprocess.PIPE).communicate()[0] | 51 | stdout=subprocess.PIPE).communicate()[0]) |
| 52 | meta = {} | 52 | meta = {} |
| 53 | for i in output.split('\n')[:-1]: # chop last char ('\n') | 53 | for i in output.split('\n')[:-1]: # chop last char ('\n') |
| 54 | key = i.split(':')[0].strip() | 54 | key = i.split(':')[0].strip() |
