Skip to content

Commit ccd75c3

Browse files
committed
installer: let answerfile accept None as to mean "add nothing"
This is useful for a lambda passed to @pytest.mark.answerfile, where in some variants of a test we want to add an element, but nothing in other variants (eg. a <raid> block) Signed-off-by: Yann Dirson <[email protected]>
1 parent 4e9c6ee commit ccd75c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/installer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def write_xml(self, filename):
1919

2020
def top_append(self, *defs):
2121
for defn in defs:
22+
if defn is None:
23+
continue
2224
self.defn['CONTENTS'].append(self._normalize_structure(defn))
2325
return self
2426

0 commit comments

Comments
 (0)