Skip to content
Snippets Groups Projects
Commit 8eb9e8fa authored by Pierre Lalet's avatar Pierre Lalet
Browse files

Merge pull request #152 from sieben/list_literal

List literal
parents 3cd2fff8 ba60ebfb
No related branches found
No related tags found
No related merge requests found
......@@ -148,10 +148,7 @@ class pcap_stat(Structure):
pass
### _fields_ list in Structure is final.
### We need a temp list
_tmpList=[]
_tmpList.append(("ps_recv",c_uint))
_tmpList.append(("ps_drop",c_uint))
_tmpList.append(("ps_ifdrop",c_uint))
_tmpList = [("ps_recv", c_uint), ("ps_drop", c_uint), ("ps_ifdrop", c_uint)]
if HAVE_REMOTE:
_tmpList.append(("ps_capt",c_uint))
_tmpList.append(("ps_sent",c_uint))
......
......@@ -226,8 +226,7 @@ class CommonHelloTLVField(StrField):
class CommonSessionTLVField(StrField):
islist = 1
def m2i(self, pkt, x):
l = []
l.append(struct.unpack("!H",x[6:8])[0])
l = [struct.unpack("!H", x[6:8])[0]]
octet = struct.unpack("B",x[8:9])[0]
l.append( (octet & 2**7 ) >> 7 )
l.append( (octet & 2**6 ) >> 6 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment