Merge pull request #241 from JonasTriki/fix-compressed-file-write

Add minor fix to OutputSplitter.write()
This commit is contained in:
Giuseppe Attardi 2021-03-18 01:14:59 +01:00 committed by GitHub
commit 881f3e4252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,10 @@ class OutputSplitter():
def write(self, data):
self.reserve(len(data))
self.file.write(data)
if self.compress:
self.file.write(data.encode('utf-8'))
else:
self.file.write(data)
def close(self):
self.file.close()