summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0004-fix-new.roots-object-is-not-iterable.patch
blob: 526a3b1fb203a1dca381f6e1d59c1838f1d7f3e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 3bb8d08bdec2f79bb13c0a44b81718d26e5bdabc Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 8 May 2017 16:30:20 +0800
Subject: [PATCH 04/11] fix new.roots object is not iterable

Upstream-Status: Pending

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 blivet/blivet.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/blivet.py b/blivet/blivet.py
index ea08837..91c92b2 100644
--- a/blivet/blivet.py
+++ b/blivet/blivet.py
@@ -1206,7 +1206,7 @@ class Blivet(object):
             p = partition.disk.format.parted_disk.getPartitionByPath(partition.path)
             partition.parted_partition = p
 
-        for root in new.roots:
+        for root in new.roots or []:
             root.swaps = [new.devicetree.get_device_by_id(d.id, hidden=True) for d in root.swaps]
             root.swaps = [s for s in root.swaps if s]
 
-- 
2.7.4

OpenPOWER on IntegriCloud