Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 3bb8d08bdec2f79bb13c0a44b81718d26e5bdabc Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Mon, 8 May 2017 16:30:20 +0800 |
| 4 | Subject: [PATCH 04/11] fix new.roots object is not iterable |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 9 | --- |
| 10 | blivet/blivet.py | 2 +- |
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | |
| 13 | diff --git a/blivet/blivet.py b/blivet/blivet.py |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | index ea08837..91c92b2 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | --- a/blivet/blivet.py |
| 16 | +++ b/blivet/blivet.py |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | @@ -1206,7 +1206,7 @@ class Blivet(object): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | p = partition.disk.format.parted_disk.getPartitionByPath(partition.path) |
| 19 | partition.parted_partition = p |
| 20 | |
| 21 | - for root in new.roots: |
| 22 | + for root in new.roots or []: |
| 23 | root.swaps = [new.devicetree.get_device_by_id(d.id, hidden=True) for d in root.swaps] |
| 24 | root.swaps = [s for s in root.swaps if s] |
| 25 | |
| 26 | -- |
| 27 | 2.7.4 |
| 28 | |