Eliminate spurious exception message in dynamic control interface

This commit is contained in:
Charles Haley 2012-07-25 07:28:11 +02:00
parent 40a273b316
commit bd6acc80c6

View File

@ -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: