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)
This commit is contained in:
parent
9b48fb4b32
commit
05864d89d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250612
@ -51,6 +51,10 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
from subprocess import PIPE
|
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
|
# A list of strings that are not really counters, just
|
||||||
# name tags that are output by pmccontrol -L
|
# name tags that are output by pmccontrol -L
|
||||||
notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ]
|
notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ]
|
||||||
@ -87,7 +91,7 @@ def main():
|
|||||||
print(result)
|
print(result)
|
||||||
if (options.wait == True):
|
if (options.wait == True):
|
||||||
try:
|
try:
|
||||||
value = input("next?")
|
value = raw_input("next?")
|
||||||
except EOFError:
|
except EOFError:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user