generated from pufereq/python-template
feat(message.py): add b"\n" at end of data from to_bytes()
This commit is contained in:
@@ -54,7 +54,7 @@ class Message:
|
|||||||
Returns:
|
Returns:
|
||||||
bytes: The message as bytes.
|
bytes: The message as bytes.
|
||||||
"""
|
"""
|
||||||
return self.to_json().encode("utf-8")
|
return self.to_json().encode("utf-8") + b"\n"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, data: dict[str, Any]) -> Message:
|
def from_dict(cls, data: dict[str, Any]) -> Message:
|
||||||
|
|||||||
Reference in New Issue
Block a user