[elbe-devel] [PATCH 2/3] Fix None case for src-opts in cdroms

Torben Hohn torben.hohn at linutronix.de
Wed Aug 7 15:55:06 CEST 2019


On Wed, Aug 07, 2019 at 03:25:32PM +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/cdroms.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/elbepack/cdroms.py b/elbepack/cdroms.py
> index ab5b6a23..9d3c1aac 100644
> --- a/elbepack/cdroms.py
> +++ b/elbepack/cdroms.py
> @@ -51,7 +51,10 @@ def iso_option_valid(opt_name, text):
>  
>  def get_iso_options(log, xml):
>      options = []
> -    for node in xml.node("target/src-opts"):
> +    src_opts = xml.node("target/src-opts")
> +    if src_opts is None:
> +        return ""
> +    for node in src_opts:
>          if node.tag not in iso_options:
>              continue
>          option = iso_options[node.tag]
> -- 
> 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