mirror of
https://github.com/OpenKMIP/PyKMIP.git
synced 2025-07-23 05:54:23 +02:00
Merge pull request #226 from OpenKMIP/bug/fix-textstring-write-value
Removing TextString check to encode characters when writing bytes
This commit is contained in:
commit
264ef64e0b
@ -810,11 +810,7 @@ class TextString(Base):
|
|||||||
def write_value(self, ostream):
|
def write_value(self, ostream):
|
||||||
# Write string to stream
|
# Write string to stream
|
||||||
for char in self.value:
|
for char in self.value:
|
||||||
if sys.version < '3':
|
ostream.write(pack(self.BYTE_FORMAT, char.encode()))
|
||||||
c = char
|
|
||||||
else:
|
|
||||||
c = char.encode()
|
|
||||||
ostream.write(pack(self.BYTE_FORMAT, c))
|
|
||||||
|
|
||||||
# Write padding to stream
|
# Write padding to stream
|
||||||
for _ in range(self.padding_length):
|
for _ in range(self.padding_length):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user