Browse Source

Fix writing unicod data in python2

test_fixup
Vadim Lebedev 2 years ago
parent
commit
0b924d9050
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libarchive/__init__.py

+ 1
- 1
libarchive/__init__.py View File

@@ -283,7 +283,7 @@ class EntryWriteStream(object):
if self.buffer:
if PY3:
self.buffer.write(data)
else:
elif isinstance(data, str):
self.buffer.write(unicode(data, ENCODING))
else:
_libarchive.archive_write_data_from_str(self.archive._a, data.encode(ENCODING))


Loading…
Cancel
Save