diff options
author | Punit Agrawal <punit1.agrawal@toshiba.co.jp> | 2021-09-09 17:05:46 +0900 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2021-09-13 08:42:13 -0400 |
commit | dc1d108be1226d8b3b5841249fc26b568a98f07b (patch) | |
tree | e58949a8422d97331725df60a85b7f5453f7d096 | |
parent | 49d2dce1f08a82e72bc084fab3f63301d6632fb2 (diff) | |
download | rteval-dc1d108be1226d8b3b5841249fc26b568a98f07b.tar.gz |
rteval: osinfo.py: Fix RT kernel detection
Since the osinfo.py module was developed, RT kernels have moved on
from identifying as "RT" to "PREEMPT_RT". This change in the kernel
identifier causes osinfo.py to incorrectly detect RT kernels as
non-RT.
Update the check for detecting RT kernel to be able to handle both the
variants.
Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | rteval/sysinfo/osinfo.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rteval/sysinfo/osinfo.py b/rteval/sysinfo/osinfo.py index 98e5b44..7b7bfe9 100644 --- a/rteval/sysinfo/osinfo.py +++ b/rteval/sysinfo/osinfo.py @@ -91,7 +91,7 @@ class OSInfo: (sys, node, release, ver, machine) = os.uname() isrt = 1 - if ver.find(' RT ') == -1: + if 'RT ' not in ver: isrt = 0 node_n = libxml2.newNode("node") |