From e8103df017de08cfca62083c23ba2ad526bded9b Mon Sep 17 00:00:00 2001 From: Marco Mascheroni Date: Tue, 15 Dec 2015 12:04:49 +0100 Subject: [PATCH 1/3] Update documentation of crab3bootstrap --- bin/crab3bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/crab3bootstrap b/bin/crab3bootstrap index 7c7c48ee2..2e572db53 100755 --- a/bin/crab3bootstrap +++ b/bin/crab3bootstrap @@ -5,7 +5,7 @@ after running 'scram unset env' In particular the script: - - saves the environment variables used by CRAB3: SCRAM_ARCH, CMSSW_BASE, CMSSW_RELEASE_BASE, CMSSW_VERSION, LOCALRT + - saves the environment variables used by CRAB3: SCRAM_ARCH, CMSSW_BASE, CMSSW_VERSION - handles the PSet file: * get the output files (tfiles and edmfiles) * dump the pickled expanded version of the pset From 6416eced64cbc1c390aeea08273ef7471d806b36 Mon Sep 17 00:00:00 2001 From: Marco Mascheroni Date: Fri, 18 Dec 2015 12:14:05 +0100 Subject: [PATCH 2/3] Fix 'ConfigSection' object has no attribute 'outputPrimaryDataset' --- src/python/CRABClient/JobType/PrivateMC.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/CRABClient/JobType/PrivateMC.py b/src/python/CRABClient/JobType/PrivateMC.py index e9265f247..6e65a5479 100644 --- a/src/python/CRABClient/JobType/PrivateMC.py +++ b/src/python/CRABClient/JobType/PrivateMC.py @@ -54,7 +54,7 @@ def validateConfig(self, config): ## If publication is True, check that there is a primary dataset name specified. if getattr(config.Data, 'publication', getParamDefaultValue('Data.publication')): - if not getattr(config.Data, 'outputPrimaryDataset'): + if not getattr(config.Data, 'outputPrimaryDataset', getParamDefaultValue('Data.outputPrimaryDataset')): msg = "Invalid CRAB configuration: Parameter Data.outputPrimaryDataset not specified." msg += "\nMC generation job type requires this parameter for publication." return False, msg From d629737eab094813b1cb9accf394dee9203c9b78 Mon Sep 17 00:00:00 2001 From: Marco Mascheroni Date: Fri, 18 Dec 2015 12:30:21 +0100 Subject: [PATCH 3/3] pylint for ClientUtilities --- src/python/CRABClient/ClientUtilities.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/python/CRABClient/ClientUtilities.py b/src/python/CRABClient/ClientUtilities.py index ed6c980c8..8ce46fcda 100644 --- a/src/python/CRABClient/ClientUtilities.py +++ b/src/python/CRABClient/ClientUtilities.py @@ -80,7 +80,7 @@ def filter(self, record): def removecolor(text): if not text: return text - for color, colorval in colors.colordict.iteritems(): + for dummyColor, colorval in colors.colordict.iteritems(): if colorval in text: text = text.replace(colorval, '') return text @@ -200,7 +200,7 @@ def uploadlogfile(logger, proxyfilename, logfilename = None, logpath = None, ins cmd = 'env' logger.debug('Running env command') pipe = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell = True) - stdout, stderr = pipe.communicate() + stdout, dummyStderr = pipe.communicate() logger.debug('\n\n\nUSER ENVIROMENT\n%s' % stdout) except Exception as se: logger.debug('Failed to get the user env\nException message: %s' % (se)) @@ -430,8 +430,8 @@ def getWorkArea(projdir): return requestarea, requestname -def loadCache(dir, logger): - requestarea, requestname = getWorkArea(dir) +def loadCache(mydir, logger): + requestarea, dummyRequestname = getWorkArea(mydir) cachename = os.path.join(requestarea, '.requestcache') #Check if the directory exists. if not os.path.isdir(requestarea): @@ -660,7 +660,7 @@ def server_info(subresource, server, proxyfilename, baseurl, **kwargs): server = CRABClient.Emulator.getEmulator('rest')(server, proxyfilename, proxyfilename, version=__version__) requestdict = {'subresource': subresource} requestdict.update(**kwargs) - dictresult, status, reason = server.get(baseurl, requestdict) + dictresult, dummyStatus, dummyReason = server.get(baseurl, requestdict) return dictresult['result'][0]