[elbe-devel] [PATCH] elbe: updated: fixed comparision for extension

Kurt Kanzenbach kurt at linutronix.de
Mon Jul 31 17:48:20 CEST 2017


This patch fixes applying gpg signed update packages.

The extensions returned by splitext is either empty or always begins with a
period. Thus, we have to check for ".gpg" instead of "gpg".

Signed-off-by: Kurt Kanzenbach <kurt at linutronix.de>
---
 elbepack/updated.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elbepack/updated.py b/elbepack/updated.py
index 6b2a966..cf96156 100644
--- a/elbepack/updated.py
+++ b/elbepack/updated.py
@@ -523,7 +523,7 @@ def action_select (upd_file, status):
 
 def is_update_file(upd_file):
     root, extension = os.path.splitext(upd_file)
-    if extension == "gpg":
+    if extension == ".gpg":
         return True
 
     try:
@@ -544,7 +544,7 @@ def handle_update_file(upd_file, status, remove=False):
         status.log ("checking file: " + str(upd_file))
         root, extension = os.path.splitext(upd_file)
 
-        if extension == "gpg":
+        if extension == ".gpg":
             fname = unsign_file (upd_file)
             if remove:
                 os.remove (upd_file)
-- 
2.11.0





More information about the elbe-devel mailing list