diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2015-07-22 12:48:55 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-07-23 10:29:10 +0200 |
commit | 9625b45edb548e0e4f88d3cfc3b79f30315c8735 (patch) | |
tree | e9f5b27db95a330700b8fec4ecbff63807cdbfa0 /python_modules/demarshal.py | |
parent | 5adcb1c340ce7427991714b0b03f49bb81f502e1 (diff) | |
download | spice-protocol-9625b45edb548e0e4f88d3cfc3b79f30315c8735.tar.gz spice-protocol-9625b45edb548e0e4f88d3cfc3b79f30315c8735.tar.xz spice-protocol-9625b45edb548e0e4f88d3cfc3b79f30315c8735.zip |
codegen: Fix enums.h generation with python3
Trying to generate enums.h with python3 results in
Traceback (most recent call last):
File "./spice_codegen.py", line 217, in <module>
write_enums(writer, options.generate_dissector)
File "./spice_codegen.py", line 99, in write_enums
write_channel_enums(writer, c, False, False)
File "./spice_codegen.py", line 17, in write_channel_enums
if len(messages) == 0:
TypeError: object of type 'filter' has no len()
filter() returns an enumerator object in python3 while it used to return
a list in python2. Using list(filter()) instead fixes that error.
I've checked that the generated enums.h is identical with python2 and
python3.
Diffstat (limited to 'python_modules/demarshal.py')
0 files changed, 0 insertions, 0 deletions