diff --git a/Pilot/pilotTools.py b/Pilot/pilotTools.py index d71f3baf..8433ffa6 100644 --- a/Pilot/pilotTools.py +++ b/Pilot/pilotTools.py @@ -1224,12 +1224,13 @@ def __initJSON2(self): # logger CE white list loggerCEsWhiteList = pilotOptions.get("RemoteLoggerCEsWhiteList", None) # restrict remote logging to a whitelisted CEs ([] => no restriction) - if not isinstance(loggerCEsWhiteList, list): - loggerCEsWhiteList = [elem.strip() for elem in loggerCEsWhiteList.split(",")] self.log.debug("JSON: Remote logging CE white list: %s" % loggerCEsWhiteList) - if loggerCEsWhiteList is not None and self.ceName not in loggerCEsWhiteList: - self.pilotLogging = False - self.log.debug("JSON: Remote logging disabled for this CE: %s" % self.ceName) + if loggerCEsWhiteList is not None: + if not isinstance(loggerCEsWhiteList, list): + loggerCEsWhiteList = [elem.strip() for elem in loggerCEsWhiteList.split(",")] + if self.ceName not in loggerCEsWhiteList: + self.pilotLogging = False + self.log.debug("JSON: Remote logging disabled for this CE: %s" % self.ceName) pilotLogLevel = pilotOptions.get("PilotLogLevel", "INFO") if pilotLogLevel.lower() == "debug": self.debugFlag = True