From 76249338889cff4f98fc5fcee13b763205e6caab Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Tue, 29 Oct 2019 11:42:16 -0300 Subject: [PATCH] [snap] not showing 'License' in the info window if it defined as 'unset' --- CHANGELOG.md | 7 ++++++- bauh/gems/snap/controller.py | 3 +++ bauh/gems/snap/resources/locale/es | 1 - bauh/gems/snap/resources/locale/pt | 1 - 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ead74c..fdf26649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [0.7.2] +### Improvements + - Snap + - not showing **License** in the info window if it defined as **unset** + ### Fixes: - - The application crashes due to Snap API checking when snap is not installed + - Snap + - The application crashes due to Snap API checking when snap is not installed ## [0.7.1] 2019-10-25 ### Features diff --git a/bauh/gems/snap/controller.py b/bauh/gems/snap/controller.py index fb453a3f..be96afa5 100644 --- a/bauh/gems/snap/controller.py +++ b/bauh/gems/snap/controller.py @@ -140,6 +140,9 @@ class SnapManager(SoftwareManager): if info.get('commands'): info['commands'] = ' '.join(info['commands']) + if info.get('license') and info['license'] == 'unset': + del info['license'] + return info def get_history(self, pkg: SnapApplication) -> PackageHistory: diff --git a/bauh/gems/snap/resources/locale/es b/bauh/gems/snap/resources/locale/es index 4b17ee5a..07e0501d 100644 --- a/bauh/gems/snap/resources/locale/es +++ b/bauh/gems/snap/resources/locale/es @@ -3,7 +3,6 @@ snap.info.commands=comandos snap.info.contact=contacto snap.info.description=descripción snap.info.license=licencia -snap.info.license.unset=no está definida snap.info.revision=revisión snap.info.tracking=tracking snap.info.installed=instalado diff --git a/bauh/gems/snap/resources/locale/pt b/bauh/gems/snap/resources/locale/pt index 1d72fe63..4960ddc5 100644 --- a/bauh/gems/snap/resources/locale/pt +++ b/bauh/gems/snap/resources/locale/pt @@ -3,7 +3,6 @@ snap.info.commands=comandos snap.info.contact=contato snap.info.description=descrição snap.info.license=licença -snap.info.license.unset=não definida snap.info.revision=revisão snap.info.tracking=tracking snap.info.installed=instalado