Skip to content

Commit

Permalink
[CORE] [PY3] Fix needed for python3: Use of subprocess instead of com…
Browse files Browse the repository at this point in the history
…mands
  • Loading branch information
smuzaffar committed Oct 25, 2021
1 parent 5240778 commit 2cc4939
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
import pprint
import subprocess
from XML2Python import xml2obj
try:
from subprocess import getoutput
except:
from commands import getoutput
from subprocess import getoutput
# These aren't all typedefs, but can sometimes make the output more
# readable
typedefsDict = \
Expand Down
6 changes: 3 additions & 3 deletions Validation/Tools/scripts/runEdmFileComparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import print_function
import optparse
import commands
import subprocess
import pprint
import re
import os
Expand Down Expand Up @@ -215,7 +215,7 @@ def label (self):
dumpCommand = 'edmDumpEventContent %s %s' % (regexLine, filename1)
if options.verboseDebug:
print(dumpCommand, '\n')
output = commands.getoutput (dumpCommand).split("\n")
output = subprocess.getoutput (dumpCommand).split("\n")
if not len(output):
raise RuntimeError("No output from edmDumpEventContent.")
if options.verboseDebug:
Expand Down Expand Up @@ -330,4 +330,4 @@ def label (self):
summaryCmd = 'summarizeEdmComparisonLogfiles.py %s %s logfiles' \
% (summaryOptions, summaryMask)
print(summaryCmd)
print(commands.getoutput (summaryCmd))
print(subprocess.getoutput (summaryCmd))
4 changes: 2 additions & 2 deletions Validation/Tools/scripts/summarizeEdmComparisonLogfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from glob import glob
import re
import pprint
import commands
import subprocess
countRE = re.compile (r'^count_(\w+)')
avoid = ['index', 'print']

Expand Down Expand Up @@ -231,7 +231,7 @@ def summaryOK (summary):
print("diffTree %s %s" % (goShlib, compRoot))
diffCmd = diffOutput.get(key)
if diffCmd:
print(commands.getoutput (diffCmd))
print(subprocess.getoutput (diffCmd))
if not options.problem and not options.mismatch:
print("\n", '='*78, '\n')
print("Success list:")
Expand Down

0 comments on commit 2cc4939

Please sign in to comment.