From 0b9e0444f5092e647a3fa55887d96ffaf3d23c06 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Wed, 18 Mar 2015 13:33:12 +0000 Subject: Update is_disk_used for changed enumerate_disk output. Fixes Launchpad bug #1311463. --- cloudinit/config/cc_disk_setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py index f899210b..e2ce6db4 100644 --- a/cloudinit/config/cc_disk_setup.py +++ b/cloudinit/config/cc_disk_setup.py @@ -304,8 +304,7 @@ def is_disk_used(device): # If the child count is higher 1, then there are child nodes # such as partition or device mapper nodes - use_count = [x for x in enumerate_disk(device)] - if len(use_count.splitlines()) > 1: + if len(list(enumerate_disk(device))) > 1: return True # If we see a file system, then its used -- cgit v1.2.3