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 | f4c729aad399e87140a18518a3a6268afd956782 (patch) | |
tree | e0f26c17eac45f6d4193272d31fcb80563c23cb6 /python_modules/spice_parser.py | |
parent | 5720971c457d866e083fac3aa08f3986a8816ac1 (diff) | |
download | spice-common-f4c729aad399e87140a18518a3a6268afd956782.tar.gz spice-common-f4c729aad399e87140a18518a3a6268afd956782.tar.xz spice-common-f4c729aad399e87140a18518a3a6268afd956782.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/spice_parser.py')
0 files changed, 0 insertions, 0 deletions