Commit 2ce37629 authored by Jim Fulton's avatar Jim Fulton

Changed a formatting routine to be a bit more robust. This routine had

been broken by a unicode user value.
parent f3778014
...@@ -337,7 +337,7 @@ class TxnHeader(object): ...@@ -337,7 +337,7 @@ class TxnHeader(object):
def asString(self): def asString(self):
s = struct.pack(TRANS_HDR, self.tid, self.tlen, self.status, s = struct.pack(TRANS_HDR, self.tid, self.tlen, self.status,
self.ulen, self.dlen, self.elen) self.ulen, self.dlen, self.elen)
return "".join([s, self.user, self.descr, self.ext]) return "".join(map(str, [s, self.user, self.descr, self.ext]))
def headerlen(self): def headerlen(self):
return TRANS_HDR_LEN + self.ulen + self.dlen + self.elen return TRANS_HDR_LEN + self.ulen + self.dlen + self.elen
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment