From a04a4a776c3ce666cea88fd9332186330ecf97b1 Mon Sep 17 00:00:00 2001 From: Martin Sivak Date: Mon, 8 Oct 2012 17:59:50 +0200 Subject: Fix firstboot category&spoke collector --- firstboot/gui/hubs/firstboot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/firstboot/gui/hubs/firstboot.py b/firstboot/gui/hubs/firstboot.py index 170a98f..6a12029 100644 --- a/firstboot/gui/hubs/firstboot.py +++ b/firstboot/gui/hubs/firstboot.py @@ -16,9 +16,8 @@ def collect_spokes(mask_paths): spokes = [] for mask, path in mask_paths: spokes.extend(collect(mask, path, - lambda obj: hasattr(obj, "category") - and obj.category != None)) - + lambda obj: hasattr(obj, "firstboot"))) + return spokes @@ -40,7 +39,8 @@ class FirstbootHub(SummaryHub): if hasattr(spoke, "firstboot") and spoke.firstboot()] for spoke in spokes: - ret[spoke.category] = spoke + ret.setdefault(spoke.category, []) + ret[spoke.category].append(spoke) return ret -- cgit