]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: return a list instead of an iterator 23392/head
authorAlexander Graul <agraul@suse.com>
Thu, 2 Aug 2018 10:31:47 +0000 (12:31 +0200)
committerAlexander Graul <agraul@suse.com>
Thu, 2 Aug 2018 12:40:11 +0000 (14:40 +0200)
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>
src/ceph-disk/ceph_disk/main.py

index e9c1a5148065d9b5e8a12935fde90b3734818941..8f32ce4d514598d29274da18fb89531b6d1b19d9 100644 (file)
@@ -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):