Reading an empty list returns a None value
Following up on #159 (closed), might be related to #229 (closed).
Consider the following device:
from tango.server import Device, attribute
class Test(Device):
@attribute(
dtype=(int,),
max_dim_x=10)
def test(self):
return []
Running with:
$ python -m tango.test_context server.Test
Can't create notifd event supplier. Notifd event not available
Ready to accept request
Test started on port 8888 with properties {}
Device access: tango://hostname:8888/test/nodb/test#dbase=no
Server access: tango://hostname:8888/dserver/Test/test#dbase=no
and the following itango client:
In [1]: d = Device('tango://hostname:8888/test/nodb/test#dbase=no')
In [2]: str(d.test)
Out[2]: 'None'
The last line should have been:
Out[2]: '[]'
I suspect the problem to be on the client side, although it has to be investigated. Help would be greatly appreciated.
Edited by Anton Joubert