send instrument='n_a' if not available
instead of null + remove another debugging print statement
This commit is contained in:
1
secop.py
1
secop.py
@ -73,7 +73,6 @@ class SecopInteractor(SecopClient):
|
||||
component['info'] = info
|
||||
component['name'] = f'{name}:value'
|
||||
component['title'] = name
|
||||
print(component)
|
||||
components.append(component)
|
||||
self.param_updates.add('value')
|
||||
self.param_updates.add('status')
|
||||
|
@ -147,7 +147,7 @@ def get_update(_=None):
|
||||
logging.info('UPDATE %s %s', client.id, socket.getfqdn(flask.request.remote_addr.split(':')[-1]))
|
||||
# msg = dict(type='id', id=client.id, title=instrument.title);
|
||||
# yield to_json_sse(msg)
|
||||
msg = dict(type='id', id=client.id, instrument=kwargs.get('instrument', '<unknown>'),
|
||||
msg = dict(type='id', id=client.id, instrument=kwargs.get('instrument') or 'n_a',
|
||||
device=client.device_name)
|
||||
yield to_json_sse(msg)
|
||||
try:
|
||||
|
Reference in New Issue
Block a user