mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
2b4e1d8608
commit
ee04420a2e
@ -38,6 +38,10 @@ class DeviceJob(BaseJob): # {{{
|
||||
BaseJob.__init__(self, description)
|
||||
self.func = func
|
||||
self.callback_on_done = done
|
||||
if not isinstance(self.callback_on_done, (Dispatcher,
|
||||
FunctionDispatcher)):
|
||||
self.callback_on_done = FunctionDispatcher(self.callback_on_done)
|
||||
|
||||
self.args, self.kwargs = args, kwargs
|
||||
self.exception = None
|
||||
self.job_manager = job_manager
|
||||
@ -259,7 +263,8 @@ class DeviceManager(Thread): # {{{
|
||||
job = self.next()
|
||||
if job is not None:
|
||||
self.current_job = job
|
||||
self.device.set_progress_reporter(job.report_progress)
|
||||
if self.device is not None:
|
||||
self.device.set_progress_reporter(job.report_progress)
|
||||
self.current_job.run()
|
||||
self.current_job = None
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user