Commit ae7a3d07 authored by Aurel's avatar Aurel

fix decode history


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@201 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bf4f12e9
...@@ -596,11 +596,11 @@ class Packet(object): ...@@ -596,11 +596,11 @@ class Packet(object):
self._body = pack('!8s', tid) self._body = pack('!8s', tid)
return self return self
def answerTransactionInformation(self, msg_id, tid, user, desc, ext, def answerTransactionInformation(self, msg_id, tid, user, desc, ext,
oid_list): oid_list):
self._id = msg_id self._id = msg_id
self._type = ANSWER_TRANSACTION_INFORMATION self._type = ANSWER_TRANSACTION_INFORMATION
body = [pack('!8sHHHL', tid, len(user), len(desc), len(ext), body = [pack('!8sHHHL', tid, len(user), len(desc), len(ext),
len(oid_list))] len(oid_list))]
body.append(user) body.append(user)
body.append(desc) body.append(desc)
...@@ -1089,7 +1089,7 @@ class Packet(object): ...@@ -1089,7 +1089,7 @@ class Packet(object):
history_list = [] history_list = []
for i in xrange(12, 12 + length * 12, 12): for i in xrange(12, 12 + length * 12, 12):
serial, size = unpack('!8sL', self._body[i:i+12]) serial, size = unpack('!8sL', self._body[i:i+12])
history_list.append(tuple(serial, size)) history_list.append((serial, size))
except: except:
raise ProtocolError(self, 'invalid answer object history') raise ProtocolError(self, 'invalid answer object history')
return oid, history_list return oid, history_list
......
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