mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Eliminate spurious exception message in dynamic control interface
This commit is contained in:
parent
40a273b316
commit
bd6acc80c6
@ -534,6 +534,7 @@ class DeviceManager(Thread): # {{{
|
||||
'The device_manager dynamic plugin methods must be called from the GUI thread')
|
||||
try:
|
||||
d = self.dynamic_plugins.get(name, None)
|
||||
if d:
|
||||
self.dynamic_plugin_requests.put((getattr(d, method), args, kwargs))
|
||||
return self.dynamic_plugin_responses.get()
|
||||
except:
|
||||
@ -556,7 +557,9 @@ class DeviceManager(Thread): # {{{
|
||||
self._queue_request(name, 'set_option', opt_string, opt_value)
|
||||
|
||||
def is_running(self, name):
|
||||
return self._queue_request(name, 'is_running')
|
||||
if self._queue_request(name, 'is_running'):
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_enabled(self, name):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user