From 6f5a072071116b6f8ba3e350fb6159b834ab0f65 Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Thu, 2 Aug 2018 12:31:47 +0200 Subject: [PATCH] ceph-disk: return a list instead of an iterator 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 --- src/ceph-disk/ceph_disk/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph-disk/ceph_disk/main.py b/src/ceph-disk/ceph_disk/main.py index e9c1a5148065d..8f32ce4d51459 100644 --- a/src/ceph-disk/ceph_disk/main.py +++ b/src/ceph-disk/ceph_disk/main.py @@ -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): -- 2.39.5