From 2e468fae67c03004d93624200f80ec0778929570 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Sat, 30 Jan 2021 08:37:17 -0300 Subject: [PATCH] [web] fix -> failing to install some applications when the expected temp directory does not exist --- CHANGELOG.md | 5 +++++ bauh/__init__.py | 2 +- bauh/gems/web/controller.py | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 461bf340..af0be9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ 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.9.14] 2021 +### Fixes +- Web + - failing to install some applications when the expected temp directory does not exist + ## [0.9.13] 2021-01-20 ### Fixes - missing Python hard dependency: **packaging** diff --git a/bauh/__init__.py b/bauh/__init__.py index 5d4e8696..ce9e3ca1 100644 --- a/bauh/__init__.py +++ b/bauh/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.9.13' +__version__ = '0.9.14' __app_name__ = 'bauh' import os diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index 33ea6d6a..66fd8cb1 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -689,6 +689,9 @@ class WebApplicationManager(SoftwareManager): install_options.append('--icon={}'.format(temp_icon_path)) self.logger.info("Writing a temp suggestion icon at {}".format(temp_icon_path)) + + Path(os.path.dirname(temp_icon_path)).mkdir(parents=True, exist_ok=True) + with open(temp_icon_path, 'wb+') as f: f.write(icon_bytes)