Skip to content

Commit

Permalink
fix: add a CE whitelist for remote logging (fix None type)
Browse files Browse the repository at this point in the history
  • Loading branch information
martynia committed Jan 23, 2024
1 parent 9a1fb3c commit 61e640e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61e640e

Please sign in to comment.