Error in handling of pre_init_callback and post_init_callback
I have discovered a bug in PyTango 10.0.2 in the handling of the pre_init_callback and post_init_callback arguments when starting a server.
The bug is in the __to_callback helper function in server.py. If the input callback is a sequence, it reuses the callback variable for the first element of the sequence on line 1801
callback = callback[0]
which means if there is a second element, the statement in line 1806
args = callback[1]
raises the exception
TypeError: 'function' object is not subscriptable
The bug was introduced in version 10.0.0.