From 63210c99247e7bc9893fea5df23de49ab9aaa8c1 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Wed, 22 May 2024 09:41:03 +0200 Subject: [PATCH] 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 Reviewed-by: Enrico Faulhaber --- frappy/client/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappy/client/__init__.py b/frappy/client/__init__.py index c8c7ad7..ebd689c 100644 --- a/frappy/client/__init__.py +++ b/frappy/client/__init__.py @@ -30,7 +30,7 @@ from collections import defaultdict from threading import Event, RLock, current_thread 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.lib import mkthread from frappy.lib.asynconn import AsynConn, ConnectionClosed @@ -370,9 +370,9 @@ class SecopClient(ProxyClient): # pylint: disable=unsubscriptable-object self._init_descriptive_data(self.request(DESCRIPTIONREQUEST)[2]) self.nodename = self.properties.get('equipment_id', self.uri) + self._set_state(True, 'connected') if self.activate: self.request(ENABLEEVENTSREQUEST) - self._set_state(True, 'connected') break except Exception: # print(formatExtendedTraceback())