[elbe-devel] [PATCH] elbe: updated: check return code of _apply_update

Manuel Traut manuel.traut at linutronix.de
Wed Aug 2 08:10:40 CEST 2017


Hi Kurt,

On Tue, Aug 01, 2017 at 04:09:04PM +0200, Kurt Kanzenbach wrote:
> Signed-off-by: Kurt Kanzenbach <kurt at linutronix.de>
> ---
>  elbepack/updated.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/elbepack/updated.py b/elbepack/updated.py
> index fd1af72..3364c59 100644
> --- a/elbepack/updated.py
> +++ b/elbepack/updated.py
> @@ -248,7 +248,7 @@ def _apply_update (fname, status):
>      try:
>          xml = etree (fname)
>      except:
> -        return "read %s failed" % fname
> +        raise Exception ( "reading %s failed " % fname )
>  
>      fpl = xml.node ("fullpkgs")
>  
> @@ -404,6 +404,8 @@ def apply_update (fname, status):
>          # don't use execute() here, it results in an error that the apt-cache
>          # is locked. We currently don't understand this behaviour :(
>          os.system ("apt-get clean")
> +        if p.exitcode != 0:
> +            raise Exception ( "Applying update failed. See logfile for more information" )
>          post_sh (c_ver, t_ver, status)
>  
>  def action_select (upd_file, status):
> -- 

thx, applied to devel/elbe-2.0

  Manuel




More information about the elbe-devel mailing list