Skip to content

Commit

Permalink
ceph-disk: return a list instead of an iterator
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
agraul committed Aug 2, 2018
1 parent eb9a9ef commit 6f5a072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ceph-disk/ceph_disk/main.py
Expand Up @@ -1498,7 +1498,7 @@ def unmount(

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):
Expand Down

0 comments on commit 6f5a072

Please sign in to comment.