[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wireshark-dev
Subject:    Re: [Wireshark-dev] Regenerating packet-parlay.c
From:       Jaap Keuter <jaap.keuter () xs4all ! nl>
Date:       2020-04-30 18:30:40
Message-ID: 5cb341d1-5096-930a-3247-321143e6f0fc () xs4all ! nl
[Download RAW message or body]

On 4/30/20 2:41 AM, Luke Mewburn wrote:
> On 20-04-30 10:35, Luke Mewburn wrote:
>   | As to the problem; looking at the use of .keys() in wireshark_gen.py,
>   | there's a couple of places where the code is either:
>   | - get_intlist(), sorted:
>   | 	ret = list(ex_hash.keys())
>   | 	ret.sort()
>   | 	return ret
>   | - get_exceptionList(), unsorted:
>   | 	ret = list(ex_hash.keys())
>   | 	return ret
>   | 
>   | Both could be simplified to an ordered result using sorted():
>   | 	ret = sorted(ex_hash.keys())
>   | 	return ret
> 
> I actually meant:
> 	ret = sorted(ex_hash)
> 	return ret
> 
> Because sorted() takes an iterable.
> That seems to work in both python2 and python3.
> 
> 
> Luke.

Hi,

tried this, but: in get_exceptionList
ret = sorted(ex_hash.keys())
TypeError: '<' not supported between instances of 'Exception' and 'Exception'

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic