mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
progress: Allow storing return data with the async class
This commit is contained in:
parent
320eb9a3e1
commit
fa876ac6ea
@ -58,6 +58,8 @@ class vmmAsyncJob(gobject.GObject):
|
||||
|
||||
# Callback sets this if there is an error
|
||||
self._error_info = None
|
||||
self._data = None
|
||||
|
||||
self.stage = self.window.get_widget("pbar-stage")
|
||||
self.pbar = self.window.get_widget("pbar")
|
||||
|
||||
@ -143,6 +145,11 @@ class vmmAsyncJob(gobject.GObject):
|
||||
return (None, None)
|
||||
return self._error_info
|
||||
|
||||
def set_data(self, data):
|
||||
self._data = data
|
||||
def get_data(self):
|
||||
return self._data
|
||||
|
||||
def exit_if_necessary(self, force_exit=False):
|
||||
thread_active = (self.bg_thread.isAlive() or not self.run_main)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user