[elbe-devel] [PATCH 1/3] Fix None case for src-opts in preprocessor
dion at linutronix.de
dion at linutronix.de
Wed Aug 7 15:25:31 CEST 2019
From: Olivier Dion <dion at linutronix.de>
Signed-off-by: Olivier Dion <dion at linutronix.de>
---
elbepack/xmlpreprocess.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/elbepack/xmlpreprocess.py b/elbepack/xmlpreprocess.py
index 66fd20d6..1cb6007e 100644
--- a/elbepack/xmlpreprocess.py
+++ b/elbepack/xmlpreprocess.py
@@ -47,6 +47,8 @@ def preprocess_pgp_key(xml):
def preprocess_iso_option(xml):
src_opts = xml.find(".//target/src-opts")
+ if src_opts is None:
+ return
strict = "strict" in src_opts.attrib and src_opts.attrib["strict"] == "true"
for opt in src_opts.iterfind("./*"):
valid = iso_option_valid(opt.tag, opt.text)
@@ -66,6 +68,7 @@ def preprocess_iso_option(xml):
raise XMLPreprocessError(violation)
print("[WARN] %s" % violation)
+
def xmlpreprocess(fname, output, variants=None):
# pylint: disable=too-many-locals
--
2.11.0
More information about the elbe-devel
mailing list