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,8 +534,9 @@ class DeviceManager(Thread): # {{{
|
|||||||
'The device_manager dynamic plugin methods must be called from the GUI thread')
|
'The device_manager dynamic plugin methods must be called from the GUI thread')
|
||||||
try:
|
try:
|
||||||
d = self.dynamic_plugins.get(name, None)
|
d = self.dynamic_plugins.get(name, None)
|
||||||
self.dynamic_plugin_requests.put((getattr(d, method), args, kwargs))
|
if d:
|
||||||
return self.dynamic_plugin_responses.get()
|
self.dynamic_plugin_requests.put((getattr(d, method), args, kwargs))
|
||||||
|
return self.dynamic_plugin_responses.get()
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return None
|
return None
|
||||||
@ -556,7 +557,9 @@ class DeviceManager(Thread): # {{{
|
|||||||
self._queue_request(name, 'set_option', opt_string, opt_value)
|
self._queue_request(name, 'set_option', opt_string, opt_value)
|
||||||
|
|
||||||
def is_running(self, name):
|
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):
|
def is_enabled(self, name):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user