fix issue with a module based on a SEA subobject
Change-Id: I15102ef0e17cd4414e8699e2967292b3853d2ac0
This commit is contained in:
parent
06551b17e2
commit
801eab4b13
@ -315,7 +315,7 @@ class SeaClient(ProxyClient, Module):
|
|||||||
elif reply is None:
|
elif reply is None:
|
||||||
reply = line.strip()
|
reply = line.strip()
|
||||||
else:
|
else:
|
||||||
raise HardwareError('SEA: superfluous reply %r to %r' % (reply, cmd))
|
self.log.info('SEA: superfluous reply %r to %r', reply, cmd)
|
||||||
if errors:
|
if errors:
|
||||||
raise HardwareError('; '.join(errors))
|
raise HardwareError('; '.join(errors))
|
||||||
return reply
|
return reply
|
||||||
@ -413,7 +413,7 @@ class SeaModule(Module):
|
|||||||
if result[0]['path'] != '':
|
if result[0]['path'] != '':
|
||||||
pass # TODO: check these cases
|
pass # TODO: check these cases
|
||||||
result[0]['key'] = 'value'
|
result[0]['key'] = 'value'
|
||||||
logger.info('PARAMS %s %r', name, result)
|
# logger.info('PARAMS %s %r', name, result)
|
||||||
base = descr['base']
|
base = descr['base']
|
||||||
params = descr['params']
|
params = descr['params']
|
||||||
extra_module_set = cfgdict.pop('extra_modules', ())
|
extra_module_set = cfgdict.pop('extra_modules', ())
|
||||||
@ -466,12 +466,12 @@ class SeaModule(Module):
|
|||||||
extra_modules[name + '.' + key] = sea_object, base, paramdesc
|
extra_modules[name + '.' + key] = sea_object, base, paramdesc
|
||||||
continue # skip this parameter
|
continue # skip this parameter
|
||||||
path2param[hdbpath] = (name, key)
|
path2param[hdbpath] = (name, key)
|
||||||
logger.info('PARAM %s %s %s', hdbpath, name, key)
|
# logger.info('PARAM %s %s %s', hdbpath, name, key)
|
||||||
attributes[key] = pobj
|
attributes[key] = pobj
|
||||||
# if hasattr(cls, 'read_' + key):
|
# if hasattr(cls, 'read_' + key):
|
||||||
# print('override %s.read_%s' % (cls.__name__, key))
|
# print('override %s.read_%s' % (cls.__name__, key))
|
||||||
|
|
||||||
def rfunc(self, cmd='hval /sics/%s/%s' % (sea_object, path)):
|
def rfunc(self, cmd='hval %s/%s' % (base, path)):
|
||||||
print('READ', cmd)
|
print('READ', cmd)
|
||||||
reply = self._iodev.query(cmd)
|
reply = self._iodev.query(cmd)
|
||||||
print('REPLY', reply)
|
print('REPLY', reply)
|
||||||
@ -601,4 +601,4 @@ class SeaDrivable(SeaModule, Drivable):
|
|||||||
self.target = value
|
self.target = value
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self._iodev.query('%s is_running 0' % self.sea_object)
|
self._iodev.query('%s is_running 0' % self.sea_object)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user