From 170778b914e1e5ce3073fae86c9f9e37dc6ada79 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 7 Dec 2020 18:41:35 -0300 Subject: [PATCH] fix -> bauh release notification not working properly --- CHANGELOG.md | 2 ++ bauh/view/core/update.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 819f1cf3..c3c3a0fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ``` ### Fixes +- Core + - bauh release notification not working properly - Web: - installation options window size diff --git a/bauh/view/core/update.py b/bauh/view/core/update.py index dfebba4c..d7d67d39 100644 --- a/bauh/view/core/update.py +++ b/bauh/view/core/update.py @@ -2,6 +2,8 @@ import logging import os from pathlib import Path +from pkg_resources import parse_version + from bauh import __app_name__, __version__ from bauh.api.constants import CACHE_PATH from bauh.api.http import HttpClient @@ -35,7 +37,7 @@ def check_for_update(logger: logging.Logger, http_client: HttpClient, i18n: I18n release_file = '{}/{}{}'.format(notifications_dir, '' if not tray else 'tray_', latest['tag_name']) if os.path.exists(release_file): logger.info("Release {} already notified".format(latest['tag_name'])) - elif latest['tag_name'] > __version__: + elif parse_version(latest['tag_name']) > parse_version(__version__): try: Path(notifications_dir).mkdir(parents=True, exist_ok=True) with open(release_file, 'w+') as f: