[PATCH v2 04/10] rteval: Use f-strings in kernel.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use f-strings in kernel.py

Signed-off-by: Anubhav Shelat <ashelat@xxxxxxxxxx>
---
 rteval/sysinfo/kernel.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rteval/sysinfo/kernel.py b/rteval/sysinfo/kernel.py
index f2e9d72ac2ef..ba5cadda40c5 100644
--- a/rteval/sysinfo/kernel.py
+++ b/rteval/sysinfo/kernel.py
@@ -47,8 +47,8 @@ class KernelInfo:
         policies = {'DLN': 'deadline', 'FF':'fifo', 'RR':'rrobin', 'TS':'other', '?':'unknown'}
         ret_kthreads = {}
         self.__log(Log.DEBUG, "getting kthread status")
-        cmd = '%s -eocommand,pid,policy,rtprio,comm' % getcmdpath('ps')
-        self.__log(Log.DEBUG, "cmd: %s" % cmd)
+        cmd = f"{getcmdpath('ps')} -eocommand,pid,policy,rtprio,comm"
+        self.__log(Log.DEBUG, f"cmd: {cmd}")
         c = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
         for p in c.stdout:
             v = p.strip().split()
-- 
2.31.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux