[elbe-devel] [PATCH v2 25/27] cdroms: improve error message, when source pkg can not d/l

Bastian Germann bage at linutronix.de
Thu Sep 24 18:52:14 CEST 2020


Am 24.09.20 um 16:56 schrieb Torben Hohn:
> The Exceptions raised by download_source() contain some context.
> 
> Add that context to the error log.
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

Reviewed-by: Bastian Germann <bage at linutronix.de>

> ---
>  elbepack/cdroms.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/elbepack/cdroms.py b/elbepack/cdroms.py
> index 73a84e0ec..7bb046416 100644
> --- a/elbepack/cdroms.py
> +++ b/elbepack/cdroms.py
> @@ -35,10 +35,10 @@ def add_source_pkg(repo, component, cache, pkg, version, forbid):
>                                      version,
>                                      '/var/cache/elbe/sources')
>          repo.includedsc(dsc, components=component, force=True)
> -    except ValueError:
> -        logging.error("No sources for package '%s'", pkg_id)
> -    except FetchError:
> -        logging.error("Source for package '%s' could not be downloaded", pkg_id)
> +    except ValueError as e:
> +        logging.error("No sources for package '%s': %s", pkg_id, str(e))
> +    except FetchError as e:
> +        logging.error("Source for package '%s' could not be downloaded: %s", pkg_id, str(e))
>  
>  def mk_source_cdrom(components, codename,
>                      init_codename, target,
> 


More information about the elbe-devel mailing list