summaryrefslogtreecommitdiff
path: root/configs/common/CpuConfig.py
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-03-05 22:51:34 -0800
committerGabe Black <gabeblack@google.com>2018-03-06 23:39:43 +0000
commit659900aedd1b4fc69b61b5dbaee39dba26848637 (patch)
tree586dcfc17855c54a4985f596a145730cdeab7309 /configs/common/CpuConfig.py
parent0bb50e6745b35c785c4d8051eb43f6bc419fb924 (diff)
downloadgem5-659900aedd1b4fc69b61b5dbaee39dba26848637.tar.xz
config: Switch from the print statement to the print function.
Change-Id: I701fa58cfcfa2767ce9ad24da314a053889878d0 Reviewed-on: https://gem5-review.googlesource.com/8762 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'configs/common/CpuConfig.py')
-rw-r--r--configs/common/CpuConfig.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/configs/common/CpuConfig.py b/configs/common/CpuConfig.py
index 327c4318d..3f193ae60 100644
--- a/configs/common/CpuConfig.py
+++ b/configs/common/CpuConfig.py
@@ -35,6 +35,8 @@
#
# Authors: Andreas Sandberg
+from __future__ import print_function
+
from m5 import fatal
import m5.objects
import inspect
@@ -64,23 +66,23 @@ def get(name):
cpu_class = _cpu_classes[name]
return cpu_class
except KeyError:
- print "%s is not a valid CPU model." % (name,)
+ print("%s is not a valid CPU model." % (name,))
sys.exit(1)
def print_cpu_list():
"""Print a list of available CPU classes including their aliases."""
- print "Available CPU classes:"
+ print("Available CPU classes:")
doc_wrapper = TextWrapper(initial_indent="\t\t", subsequent_indent="\t\t")
for name, cls in _cpu_classes.items():
- print "\t%s" % name
+ print("\t%s" % name)
# Try to extract the class documentation from the class help
# string.
doc = inspect.getdoc(cls)
if doc:
for line in doc_wrapper.wrap(doc):
- print line
+ print(line)
def cpu_names():
"""Return a list of valid CPU names."""