From 67d8204d19c16fdfed0aaf6ac8f5ca4a1431b461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Mon, 18 May 2020 15:11:01 -0300 Subject: [PATCH] [fix][ui] initialization dialog hangs when there is no task to wait for --- CHANGELOG.md | 1 + bauh/view/qt/prepare.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef86581..5d634131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - i18n ### Fixes +- initialization dialog hangs when there is no task to wait for [#112](https://github.com/vinifmor/bauh/issues/112) - not caching data of repository packages with unknown repository names ## [0.9.3] 2020-05-12 diff --git a/bauh/view/qt/prepare.py b/bauh/view/qt/prepare.py index 430d1424..15a4a9ee 100644 --- a/bauh/view/qt/prepare.py +++ b/bauh/view/qt/prepare.py @@ -58,8 +58,8 @@ class Prepare(QThread, TaskManager): if not ok: QCoreApplication.exit(1) - self.signal_started.emit() self.manager.prepare(self, root_pwd, None) + self.signal_started.emit() def update_progress(self, task_id: str, progress: float, substatus: str): self.signal_update.emit(task_id, progress, substatus) @@ -85,9 +85,8 @@ class CheckFinished(QThread): def run(self): time.sleep(3) while True: - if self.total is not None and self.finished is not None: - if self.total == self.finished: - break + if self.total == self.finished: + break time.sleep(0.01)