Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CORE] Fix needed for python3: Use of subprocess instead of commands #35822

Merged
merged 1 commit into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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