Skip to content

Commit f23622d

Browse files
authored
Merge pull request #6825 from chaen/v8.0_FIX_transIDAsInt
[8.0] keep the utilities transID an int (revert again...)
2 parents 48f2e02 + f0e7413 commit f23622d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/DIRAC/TransformationSystem/Client/Utilities.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,24 @@ def __init__(self, plugin="Standard", transClient=None, dataManager=None, fc=Non
5151
self.dmsHelper = DMSHelpers()
5252

5353
self.plugin = plugin
54-
self.transID = str(transID) if transID else "None"
54+
# Keep transID an int as this is the type expected by service !!!!
55+
self.transID = transID
56+
self.transIDStr = str(transID) if transID else "None"
5557
self.params = {}
5658
self.groupSize = 0
5759
self.maxFiles = 0
5860
self.cachedLFNSize = {}
5961
self.transString = ""
6062
self.debug = debug
6163

62-
self.log = gLogger.getSubLogger(self.plugin + self.transID)
64+
self.log = gLogger.getSubLogger(self.plugin + self.transIDStr)
6365
# FIXME: This doesn't work (yet) but should soon, will allow scripts to get the context
6466
self.log.showHeaders(True)
6567

6668
def logVerbose(self, message, param=""):
6769
"""logger helper"""
6870
if self.debug:
69-
log = gLogger.getSubLogger(self.plugin + " (V)" + self.transID)
71+
log = gLogger.getSubLogger(self.plugin + " (V)" + self.transIDStr)
7072
log.info(message, param)
7173
else:
7274
self.log.verbose(message, param)
@@ -94,8 +96,9 @@ def logException(self, message, param="", lException=False):
9496
def setParameters(self, params):
9597
"""Set the transformation parameters and extract transID"""
9698
self.params = params
97-
self.transID = str(params["TransformationID"])
98-
self.log = gLogger.getSubLogger(self.plugin + self.transID)
99+
self.transID = params["TransformationID"]
100+
self.transIDStr = str(self.transID) if self.transID else "None"
101+
self.log = gLogger.getSubLogger(self.plugin + self.transIDStr)
99102

100103
# @timeThis
101104
def groupByReplicas(self, files, status):

0 commit comments

Comments
 (0)