mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
update thread improvements
This commit is contained in:
@@ -69,16 +69,20 @@ class UpdateSelectedApps(AsyncAction):
|
|||||||
|
|
||||||
success = False
|
success = False
|
||||||
|
|
||||||
for app in self.apps_to_update:
|
if self.apps_to_update:
|
||||||
self.signal_status.emit(app.model.base_data.name)
|
updated = 0
|
||||||
success = self.manager.update(app.model, self.root_password, self)
|
for app in self.apps_to_update:
|
||||||
|
self.signal_status.emit(app.model.base_data.name)
|
||||||
|
success = bool(self.manager.update(app.model, self.root_password, self))
|
||||||
|
|
||||||
if not success:
|
if not success:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.signal_output.emit('\n')
|
updated += 1
|
||||||
|
self.signal_output.emit('\n')
|
||||||
|
|
||||||
|
self.signal_finished.emit(success, updated)
|
||||||
|
|
||||||
self.signal_finished.emit(success, len(self.apps_to_update))
|
|
||||||
self.apps_to_update = None
|
self.apps_to_update = None
|
||||||
|
|
||||||
def handle(self, proc: SystemProcess) -> bool:
|
def handle(self, proc: SystemProcess) -> bool:
|
||||||
|
|||||||
Reference in New Issue
Block a user