We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 668c93b + 11d2af1 commit b079210Copy full SHA for b079210
1 file changed
trepan/inout/tcpfns.py
@@ -21,7 +21,9 @@
21
22
def pack_msg(msg):
23
fmt = '%%0%dd' % LOG_MAX_MSG # A funny way of writing: '%04d'
24
- return bytes(( fmt % len(msg)) + msg, 'UTF-8')
+ byte_msg = bytes(msg, 'UTF-8')
25
+ byte_fmt = bytes(fmt % len(byte_msg), 'UTF-8')
26
+ return byte_fmt + byte_msg
27
28
def unpack_msg(buf):
29
if len(buf) == 0:
0 commit comments