rteval/rteval-Use-f-strings-in-cputopology.patch

32 lines
1.2 KiB
Diff
Raw Normal View History

From c8f7457cfb23b595bdd3f500dc1c9790c7302dd3 Mon Sep 17 00:00:00 2001
From: Anubhav Shelat <ashelat@redhat.com>
Date: Thu, 1 Jun 2023 16:27:29 -0400
Subject: rteval: Use f-strings in cputopology
Use f-strings in cputopology
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/sysinfo/cputopology.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/rteval/sysinfo/cputopology.py b/rteval/sysinfo/cputopology.py
index ced7e1f295b7..2bb632312320 100644
--- a/rteval/sysinfo/cputopology.py
+++ b/rteval/sysinfo/cputopology.py
@@ -124,9 +124,7 @@ def unit_test(rootdir):
x.saveFormatFileEnc('-', 'UTF-8', 1)
print(" ---- getCPUcores() / getCPUscokets() ---- ")
- print("CPU cores: %i (online: %i) - CPU sockets: %i" % (cputop.cpu_getCores(False),
- cputop.cpu_getCores(True),
- cputop.cpu_getSockets()))
+ print(f"CPU cores: {cputop.cpu_getCores(False)} (online: {cputop.cpu_getCores(True)}) - CPU sockets: {cputop.cpu_getSockets()}")
return 0
except Exception as e:
# import traceback
--
2.40.1