summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorhiren <hiren@FreeBSD.org>2013-05-13 19:53:19 +0000
committerhiren <hiren@FreeBSD.org>2013-05-13 19:53:19 +0000
commit147f9d7365c517212e63c37485dfdf3cabf2a01e (patch)
treed622944e99cb6980f8ee16f519e574f2b952b3d3 /tools
parente848dec808ea0844791c78f21718da2be9ab43ed (diff)
downloadFreeBSD-src-147f9d7365c517212e63c37485dfdf3cabf2a01e.zip
FreeBSD-src-147f9d7365c517212e63c37485dfdf3cabf2a01e.tar.gz
As python3 does not have raw_input(), convert it to input() when we
are using python3. PR: 177214 Reviewed by: gnn Approved by: sbruno (mentor)
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test/hwpmc/pmctest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py
index fb4a977..9265dde 100755
--- a/tools/test/hwpmc/pmctest.py
+++ b/tools/test/hwpmc/pmctest.py
@@ -51,6 +51,10 @@ import sys
import subprocess
from subprocess import PIPE
+# Use input() for Python version 3
+if sys.version_info[0] == 3:
+ raw_input = input
+
# A list of strings that are not really counters, just
# name tags that are output by pmccontrol -L
notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ]
@@ -87,7 +91,7 @@ def main():
print(result)
if (options.wait == True):
try:
- value = input("next?")
+ value = raw_input("next?")
except EOFError:
sys.exit()
OpenPOWER on IntegriCloud