diff --git a/kmip/core/primitives.py b/kmip/core/primitives.py index 3bfc8e7..a95f013 100644 --- a/kmip/core/primitives.py +++ b/kmip/core/primitives.py @@ -810,11 +810,7 @@ class TextString(Base): def write_value(self, ostream): # Write string to stream for char in self.value: - if sys.version < '3': - c = char - else: - c = char.encode() - ostream.write(pack(self.BYTE_FORMAT, c)) + ostream.write(pack(self.BYTE_FORMAT, char.encode())) # Write padding to stream for _ in range(self.padding_length):