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
Patch applied and pushed to master. Thanks!