misc: Use python f-strings for string formatting

This patch has been generated by applying flynt to the
gem5 repo (ext has been excluded)

JIRA: https://gem5.atlassian.net/browse/GEM5-831

Change-Id: I0935db6223d5426b99515959bde78e374cbadb04
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68957
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Giacomo Travaglini
2023-03-15 13:34:46 +00:00
parent 07fca546e6
commit e73655d038
242 changed files with 814 additions and 1002 deletions

View File

@@ -347,8 +347,8 @@ if args.benchmark:
try:
bm = Benchmarks[args.benchmark]
except KeyError:
print("Error benchmark %s has not been defined." % args.benchmark)
print("Valid benchmarks are: %s" % DefinedBenchmarks)
print(f"Error benchmark {args.benchmark} has not been defined.")
print(f"Valid benchmarks are: {DefinedBenchmarks}")
sys.exit(1)
else:
if args.dual:
@@ -433,7 +433,7 @@ if buildEnv["USE_ARM_ISA"] and not args.bare_metal and not args.dtb_filename:
if hasattr(root, sysname):
sys = getattr(root, sysname)
sys.workload.dtb_filename = os.path.join(
m5.options.outdir, "%s.dtb" % sysname
m5.options.outdir, f"{sysname}.dtb"
)
sys.generateDtb(sys.workload.dtb_filename)

View File

@@ -159,8 +159,7 @@ if args.bench:
multiprocesses.append(workload.makeProcess())
except:
print(
"Unable to find workload for %s: %s"
% (get_runtime_isa().name(), app),
f"Unable to find workload for {get_runtime_isa().name()}: {app}",
file=sys.stderr,
)
sys.exit(1)