SecopClient.online must be True while activating
as callbacks trigger by updates while activating may check for online state + remove unused imports Change-Id: I37df839abf6b7225389b803347234a3d0bc8d799 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/33745 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
47c5e297d4
commit
63210c9924
@ -30,7 +30,7 @@ from collections import defaultdict
|
|||||||
from threading import Event, RLock, current_thread
|
from threading import Event, RLock, current_thread
|
||||||
|
|
||||||
import frappy.params
|
import frappy.params
|
||||||
from frappy.errors import make_secop_error, SECoPError, WrongTypeError, ProtocolError, ProgrammingError
|
from frappy.errors import make_secop_error, SECoPError, WrongTypeError
|
||||||
from frappy.datatypes import get_datatype
|
from frappy.datatypes import get_datatype
|
||||||
from frappy.lib import mkthread
|
from frappy.lib import mkthread
|
||||||
from frappy.lib.asynconn import AsynConn, ConnectionClosed
|
from frappy.lib.asynconn import AsynConn, ConnectionClosed
|
||||||
@ -370,9 +370,9 @@ class SecopClient(ProxyClient):
|
|||||||
# pylint: disable=unsubscriptable-object
|
# pylint: disable=unsubscriptable-object
|
||||||
self._init_descriptive_data(self.request(DESCRIPTIONREQUEST)[2])
|
self._init_descriptive_data(self.request(DESCRIPTIONREQUEST)[2])
|
||||||
self.nodename = self.properties.get('equipment_id', self.uri)
|
self.nodename = self.properties.get('equipment_id', self.uri)
|
||||||
|
self._set_state(True, 'connected')
|
||||||
if self.activate:
|
if self.activate:
|
||||||
self.request(ENABLEEVENTSREQUEST)
|
self.request(ENABLEEVENTSREQUEST)
|
||||||
self._set_state(True, 'connected')
|
|
||||||
break
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
# print(formatExtendedTraceback())
|
# print(formatExtendedTraceback())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user