mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-07-07 07:33:40 +01:00
Add support for Python 3
Add support for running under Python 3, while maintaining compatibility with Python 2. See http://python-future.org/compatible_idioms.html for more details behind these changes.
This commit is contained in:
committed by
Marc Bonnici
parent
c3ddb31d4d
commit
b3de85455a
doc/source
setup.pywa
commands
framework
configuration
exception.pyexecution.pygetters.pyhost.pyinstrument.pyjob.pyoutput.pyplugin.pypluginloader.pyresource.pyrun.pytarget
version.pyinstruments
output_processors
utils
cpustates.pydiff.pydoc.pyexec_control.pylog.pymisc.pyrevent.pyserializer.pyterminalsize.pytrace_cmd.pytypes.py
workloads
exoplayer
hackbench
jankbench
meabo
openssl
sysbench
vellamo
@ -24,6 +24,10 @@ from wa.framework.target.manager import TargetManager
|
||||
from wa.utils.revent import ReventRecorder
|
||||
|
||||
|
||||
if sys.version_info[0] == 3:
|
||||
raw_input = input
|
||||
|
||||
|
||||
class RecordCommand(Command):
|
||||
|
||||
name = 'record'
|
||||
@ -146,7 +150,7 @@ class RecordCommand(Command):
|
||||
if os.path.exists(host_path):
|
||||
msg = 'Revent file \'{}\' already exists, overwrite? [y/n]'
|
||||
self.logger.info(msg.format(revent_file_name))
|
||||
if raw_input('') == 'y':
|
||||
if input('') == 'y':
|
||||
os.remove(host_path)
|
||||
else:
|
||||
msg = 'Did not pull and overwrite \'{}\''
|
||||
@ -222,7 +226,7 @@ class RecordCommand(Command):
|
||||
if not file_name:
|
||||
file_name = '{}.revent'.format(self.target.model)
|
||||
if not output_path:
|
||||
output_path = os.getcwdu()
|
||||
output_path = os.getcwd()
|
||||
|
||||
return output_path, file_name
|
||||
|
||||
|
Reference in New Issue
Block a user