Python2 to Python3 changed the return of map() from a list to a
"map object" which is an interator. This commit turns the returned
"map object" of extract_parted_partition_numbers() back into a list.
Fixes: https://tracker.ceph.com/issues/26830
Signed-off-by: Alexander Graul <agraul@suse.com>
def extract_parted_partition_numbers(partitions):
numbers_as_strings = re.findall('^\d+', partitions, re.MULTILINE)
- return map(int, numbers_as_strings)
+ return list(map(int, numbers_as_strings))
def get_free_partition_index(dev):