[fix][ui] initialization dialog hangs when there is no task to wait for

This commit is contained in:
Vinícius Moreira
2020-05-18 15:11:01 -03:00
parent b9844711d9
commit 67d8204d19
2 changed files with 4 additions and 4 deletions

View File

@@ -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)