py3: fix reading bytes and trying to write in text mode

This commit is contained in:
Eli Schwartz 2019-05-30 22:41:17 -04:00
parent 9a169c86c7
commit fbba92281d
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -716,7 +716,7 @@ def main(args=sys.argv):
td = "None"
if t and len(t) > 0:
td = os.path.basename(args[1])+"_thumbnail."+lrf.thumbail_extension()
with open(td, "w") as f:
with open(td, "wb") as f:
f.write(t)
fields = LRFMetaFile.__dict__.items()