mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 05:27:55 +00:00
correct len() of item to convert from utf-8 first
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@303 e5f2f494-b856-4b98-b285-d166d9295462
This commit is contained in:
parent
02b62f9e5a
commit
ff55be8a87
@ -44,7 +44,7 @@ def _encode_tag(tag):
|
|||||||
"""Encode a single UTF-8 tag.
|
"""Encode a single UTF-8 tag.
|
||||||
... wire_partial = Message._encode_tag('this')
|
... 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):
|
def _encode_length_and_type(data, datatype):
|
||||||
"""Helper method to handle the length encoding in one place."""
|
"""Helper method to handle the length encoding in one place."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user