diff --git a/Utilities/ReleaseScripts/scripts/duplicateReflexLibrarySearch.py b/Utilities/ReleaseScripts/scripts/duplicateReflexLibrarySearch.py index 3a4f0f752dc52..a7e1f231fb551 100755 --- a/Utilities/ReleaseScripts/scripts/duplicateReflexLibrarySearch.py +++ b/Utilities/ReleaseScripts/scripts/duplicateReflexLibrarySearch.py @@ -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 = \ diff --git a/Validation/Tools/scripts/runEdmFileComparison.py b/Validation/Tools/scripts/runEdmFileComparison.py index cbe96e03b51c1..10c463fb98135 100755 --- a/Validation/Tools/scripts/runEdmFileComparison.py +++ b/Validation/Tools/scripts/runEdmFileComparison.py @@ -2,7 +2,7 @@ from __future__ import print_function import optparse -import commands +import subprocess import pprint import re import os @@ -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: @@ -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)) diff --git a/Validation/Tools/scripts/summarizeEdmComparisonLogfiles.py b/Validation/Tools/scripts/summarizeEdmComparisonLogfiles.py index 17a2471282bbd..a2af145ee2ead 100755 --- a/Validation/Tools/scripts/summarizeEdmComparisonLogfiles.py +++ b/Validation/Tools/scripts/summarizeEdmComparisonLogfiles.py @@ -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'] @@ -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:")