diff --git a/Script/cs/Threads/InfoServiceThread.py b/Script/cs/Threads/InfoServiceThread.py index 94b589431e497b917246b7f716168fb2b3345b89..e1be26d389a554e1bd24982be12d1a486a5b2af3 100644 --- a/Script/cs/Threads/InfoServiceThread.py +++ b/Script/cs/Threads/InfoServiceThread.py @@ -1,5 +1,4 @@ #!/usr/bin/env tdaq_python -import logging import threading import psutil from datetime import datetime @@ -65,9 +64,9 @@ class InfoServiceThread(threading.Thread): def send_update(self): try: self.logger.debug("Getting state from IS") - - cs_state = ispy.ISInfoDynAny() - self.is_info_dictionary.getValue("{}.CastorScriptState".format(self.conf.partition), cs_state) + data_identifier = "{}.CastorScriptState".format(self.conf.partition) + cs_state = ispy.ISInfoDynAny() #pylint: disable=no-member + self.is_info_dictionary.getValue(data_identifier, cs_state) cs_state.tdaq_app_name = self.tdaq_app_name cs_state.uptime_seconds = self.uptime_seconds @@ -75,6 +74,6 @@ class InfoServiceThread(threading.Thread): keep_history = True self.is_info_dictionary.checkin(data_identifier, self.cs_state, keep_history) - self.logger.debug("Update sent: {}".format(cs_state)) + self.logger.debug("Update sent: %s", str(cs_state)) except Exception as ex: - self.logger.warning("Error occured while trying to change cs_state to tdaq_app_name={} uptime_seconds={}. Error was: {}".format(self.tdaq_app_name, self.uptime_seconds, ex)) + self.logger.warning("Error occured while trying to change cs_state to tdaq_app_name=%s uptime_seconds=%d. Error was: %s",self.tdaq_app_name, self.uptime_seconds, str(ex))