[rhel7-branch][PATCH] Expect addons to have categories for both GUI and TUI

Vratislav Podzimek vpodzime at redhat.com
Tue Jun 16 19:31:12 UTC 2015


That's what we do in Anaconda now so we should expect the same from addons.

Also check the categories not spokes directory for existence when adding paths
for categories.

Related: rhbz#1128616

(cherry picked from commit 1ac1794d0156f2179504db12feb7378d662fe827)
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/addons.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/addons.py b/pyanaconda/addons.py
index d360946..5083167 100644
--- a/pyanaconda/addons.py
+++ b/pyanaconda/addons.py
@@ -56,9 +56,9 @@ def collect_addon_paths(toplevel_addon_paths, ui_subdir="gui"):
             if os.path.isdir(addon_spoke_path):
                 module_paths["spokes"].append(("%s.%s.spokes.%%s" % (addon_id, ui_subdir), addon_spoke_path))
 
-            addon_category_path = os.path.join(path, addon_id, ui_subdir, "categories")
-            if os.path.isdir(addon_spoke_path):
-                module_paths["categories"].append(("%s.%s.categories.%%s" % (addon_id, ui_subdir), addon_category_path))
+            addon_category_path = os.path.join(path, addon_id, "categories")
+            if os.path.isdir(addon_category_path):
+                module_paths["categories"].append(("%s.categories.%%s" % addon_id, addon_category_path))
 
     return module_paths
 
-- 
2.1.0



More information about the anaconda-patches mailing list