leapp/0007-Dialog-creation-fails-for-a-Component-without-choice.patch
Petr Stodulka 257b6fe19e CTC2 builds
- Bump leapp-framework to 4.0
- Improve the report summary output to make it more visible
- Fix processing data in remediation instructions with non-ascii characters
- Fix creation of Dialog for Component without choices
- Store tracebacks from actors in leapp.db
- Resolves: #2223312
2023-07-17 22:27:22 +02:00

29 lines
924 B
Diff

From 5cda0ebbf266cbe31e2a2e78f44a4cbe0e1089c2 Mon Sep 17 00:00:00 2001
From: Ygal Blum <ygal.blum@gmail.com>
Date: Mon, 1 May 2023 11:45:28 +0300
Subject: [PATCH 07/18] Dialog creation fails for a Component without choices
choices is not an attribute of Component only of some its subclasses
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
---
leapp/dialogs/dialog.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/leapp/dialogs/dialog.py b/leapp/dialogs/dialog.py
index a1d65c7..3ead810 100644
--- a/leapp/dialogs/dialog.py
+++ b/leapp/dialogs/dialog.py
@@ -54,7 +54,7 @@ class Dialog(object):
@property
def answerfile_sections(self):
- return {"{}.{}".format(self.scope, c.key): c.choices for c in self.components}
+ return {"{}.{}".format(self.scope, c.key): getattr(c, "choices", []) for c in self.components}
@property
def min_label_width(self):
--
2.41.0