diff --git a/src/lib/cc/python/ISC/CC/Message.py b/src/lib/cc/python/ISC/CC/Message.py index 059cbde773..6210742d29 100644 --- a/src/lib/cc/python/ISC/CC/Message.py +++ b/src/lib/cc/python/ISC/CC/Message.py @@ -44,7 +44,7 @@ def _encode_tag(tag): """Encode a single UTF-8 tag. ... wire_partial = Message._encode_tag('this') """ - return(struct.pack(">B", len(tag)) + bytearray(tag, 'utf-8')) + return(struct.pack(">B", len(bytearray(tag, 'utf-8'))) + bytearray(tag, 'utf-8')) def _encode_length_and_type(data, datatype): """Helper method to handle the length encoding in one place."""