[elbe-devel] [PATCH 1/3] Fix None case for src-opts in preprocessor

Torben Hohn torben.hohn at linutronix.de
Wed Aug 7 15:54:49 CEST 2019


On Wed, Aug 07, 2019 at 03:25:31PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn 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
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list