[svn] commit: r303 - /branches/parkinglot/src/lib/cc/python/ISC/CC/Message.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Nov 20 10:37:06 UTC 2009
Author: mgraff
Date: Fri Nov 20 10:37:05 2009
New Revision: 303
Log:
correct len() of item to convert from utf-8 first
Modified:
branches/parkinglot/src/lib/cc/python/ISC/CC/Message.py
Modified: branches/parkinglot/src/lib/cc/python/ISC/CC/Message.py
==============================================================================
--- branches/parkinglot/src/lib/cc/python/ISC/CC/Message.py (original)
+++ branches/parkinglot/src/lib/cc/python/ISC/CC/Message.py Fri Nov 20 10:37:05 2009
@@ -44,7 +44,7 @@
"""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."""
More information about the bind10-changes
mailing list