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

Kurt Kanzenbach kurt at linutronix.de
Tue Aug 1 16:09:04 CEST 2017


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):
-- 
2.11.0





More information about the elbe-devel mailing list