Skip to content

Commit

Permalink
Merge pull request #28078 from smuzaffar/python3-fix1
Browse files Browse the repository at this point in the history
Python3: changes needed to fix runTheMatrix errors for PY3 IBs
  • Loading branch information
cmsbuild committed Oct 1, 2019
2 parents 8d809c2 + 9487130 commit 0d3768d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Configuration/Applications/python/ConfigBuilder.py
Expand Up @@ -143,7 +143,7 @@ def filesFromDASQuery(query,option="",s=None):
if count!=0:
print('Sleeping, then retrying DAS')
time.sleep(100)
p = Popen('dasgoclient %s --query "%s"'%(option,query), stdout=PIPE,shell=True)
p = Popen('dasgoclient %s --query "%s"'%(option,query), stdout=PIPE,shell=True, universal_newlines=True)
pipe=p.stdout.read()
tupleP = os.waitpid(p.pid, 0)
eC=tupleP[1]
Expand Down
6 changes: 3 additions & 3 deletions GeneratorInterface/LHEInterface/scripts/cmsLHEtoEOSManager.py
Expand Up @@ -29,7 +29,7 @@ def articleExist(artId):

itExists = False
theCommand = defaultEOSlistCommand+' '+defaultEOSRootPath
dirList = subprocess.Popen(["/bin/sh","-c",theCommand], stdout=subprocess.PIPE)
dirList = subprocess.Popen(["/bin/sh","-c",theCommand], stdout=subprocess.PIPE, universal_newlines=True)
for line in dirList.stdout.readlines():
if findXrdDir(line) == str(artId):
itExists = True
Expand All @@ -41,7 +41,7 @@ def lastArticle():
artList = [0]

theCommand = defaultEOSlistCommand+' '+defaultEOSRootPath
dirList = subprocess.Popen(["/bin/sh","-c",theCommand], stdout=subprocess.PIPE)
dirList = subprocess.Popen(["/bin/sh","-c",theCommand], stdout=subprocess.PIPE, universal_newlines=True)
for line in dirList.stdout.readlines():
try:
if line.rstrip('\n') != '':
Expand Down Expand Up @@ -261,7 +261,7 @@ def fileUpload(uploadPath,lheList, checkSumList, reallyDoIt):
elif options.artIdLi !=0:
listPath = defaultEOSRootPath+'/'+str(options.artIdLi)
theCommand = defaultEOSlistCommand+' '+listPath
exeList = subprocess.Popen(["/bin/sh","-c",theCommand], stdout=subprocess.PIPE)
exeList = subprocess.Popen(["/bin/sh","-c",theCommand], stdout=subprocess.PIPE, universal_newlines=True)
for line in exeList.stdout.readlines():
if findXrdDir(line) != None:
print(findXrdDir(line))
Expand Down
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/addOnTests.py
Expand Up @@ -194,7 +194,7 @@ def runTests(self, testList = None):
os.system(cmd)

import pickle
pickle.dump(self.commands, open('logs/addOnTests.pkl', 'w') )
pickle.dump(self.commands, open('logs/addOnTests.pkl', 'wb'), protocol=2)

os.chdir(actDir)

Expand Down

0 comments on commit 0d3768d

Please sign in to comment.