Menu

#24 cdemu-client: Make compatible with Python 3

None
closed
nobody
None
unassigned
default
2017-01-09
2017-01-08
No

In Python 3, map() returns an iterator instead of a list. The filenames
iterator is eventually passed to PyGI for the "DeviceLoad" call. When
PyGI tries to serialize the iterator into an "as" GVariant array of
strings, it chokes on not being able to use len() on the iterator.

To fix this, replace the map with a list comprehension, which is also
considered more pythonic.

Downstream bug: https://bugs.archlinux.org/task/52437

1 Attachments

Discussion

  • Rok Mandeljc

    Rok Mandeljc - 2017-01-09
    • status: open --> closed
    • Milestone: -->
     
  • Rok Mandeljc

    Rok Mandeljc - 2017-01-09

    Patch applied and pushed to master. Thanks!

     

Log in to post a comment.