# HG changeset patch # User Goffi # Date 1561359432 -7200 # Node ID 9201caf7b2a879350149bd5351871d1b48f839a7 # Parent 455f0d305b877d569b26123d5bed5d832d0fcac9 flatpak (build_manifest): don't crash if icon is not specified diff -r 455f0d305b87 -r 9201caf7b2a8 flatpak/build_manifest.py --- a/flatpak/build_manifest.py Mon Jun 24 08:40:00 2019 +0200 +++ b/flatpak/build_manifest.py Mon Jun 24 08:57:12 2019 +0200 @@ -792,7 +792,9 @@ def get_icon(): icon = build_settings.get('icon') - if icon is not None: + if icon is None: + return [] + else: if isinstance(icon, str): icon = {'url': icon} icon_path = Path(urlparse(icon['url']).path) @@ -807,13 +809,15 @@ dest_path = f"/app/share/icons/hicolor/{icon['size']}/apps/{app_id}.{suffix}" - return file_from_url( + data = file_from_url( url = icon['url'], dest = dest_path, # we have common cache if several manifest use the same icon URL step_name = f"icon__{icon}", step_message = "retrieving application icon", ) + data[0]['name'] = 'icon' + return data def generate_appdata_from_template(template_file):