Py3: Return bytes from _Component class

This commit is contained in:
Shadab Zafar 2016-06-04 20:50:42 +05:30 committed by Maximilian Hils
parent ced6fb4cf9
commit 07a0d6dcc2

View File

@ -261,7 +261,7 @@ class _Component(Token):
"""
A value component of the primary specification of an message.
Components produce byte values desribe the bytes of the message.
Components produce byte values describing the bytes of the message.
"""
def values(self, settings): # pragma: no cover
@ -272,9 +272,9 @@ class _Component(Token):
def string(self, settings=None):
"""
A string representation of the object.
A bytestring representation of the object.
"""
return "".join(i[:] for i in self.values(settings or {}))
return b"".join(i[:] for i in self.values(settings or {}))
class KeyValue(_Component):