Commit d74521ee authored by Grégory Wisniewski's avatar Grégory Wisniewski

Use list comprehension instead of map().

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1671 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent a1bcc377
......@@ -1102,7 +1102,7 @@ class AddPendingNodes(Packet):
def _decode(self, body):
(n, ) = unpack('!H', body[:2])
uuid_list = [unpack('!16s', body[2+i*16:18+i*16])[0] for i in xrange(n)]
uuid_list = map(_decodeUUID, uuid_list)
uuid_list = [_decodeUUID(x) for x in uuid_list]
return (uuid_list, )
class AnswerNewNodes(Packet):
......@@ -1117,7 +1117,7 @@ class AnswerNewNodes(Packet):
def _decode(self, body):
(n, ) = unpack('!H', body[:2])
uuid_list = [unpack('!16s', body[2+i*16:18+i*16])[0] for i in xrange(n)]
uuid_list = map(_decodeUUID, uuid_list)
uuid_list = [_decodeUUID(x) for x in uuid_list]
return (uuid_list, )
class NotifyNodeInformation(Packet):
......
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