fixes for udsadctor on script exec

This commit is contained in:
Adolfo Gómez García 2020-04-01 13:35:21 +02:00
parent 173caa250e
commit 43fbfdab3d
2 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class PublicProvider(handler.Handler):
logger.debug('Received script: {}'.format(self._params))
if 'script' not in self._params:
raise Exception('Invalid script parameters')
if 'user' in self._params:
if self._params.get('user', False):
logger.debug('Sending SCRIPT to client')
self._service._clientsPool.executeScript(self._params['script']) # pylint: disable=protected-access
else:

View File

@ -44,3 +44,4 @@ class ScriptExecutorThread(threading.Thread):
exec(self.script, globals(), None) # pylint: disable=exec-used
except Exception as e:
logger.error('Error executing script: {}'.format(e))
logger.exception()