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

Manuel Traut manuel.traut at linutronix.de
Tue Aug 1 08:39:52 CEST 2017


Hi Kurt,

On Mon, Jul 31, 2017 at 05:48:20PM +0200, Kurt Kanzenbach wrote:
> 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)

thx; applied to devel/elbe-2.0




More information about the elbe-devel mailing list