rteval/SOURCES/rteval-systopology.py-Remov...

49 lines
1.5 KiB
Diff

From 42d724f1a68815ecf7b44c7a2b9001363c93f4ce Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Thu, 18 May 2017 13:32:48 +0200
Subject: [PATCH 08/18] rteval: systopology.py: Remove underscore from sysread
Remove underscore from sysread.
I'm eseentially backporting this comment from the obsolete file
rteval/sysinfo/systopology.py
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/systopology.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rteval/systopology.py b/rteval/systopology.py
index 7c0985e9d26e..fc3876c20bc9 100644
--- a/rteval/systopology.py
+++ b/rteval/systopology.py
@@ -27,7 +27,7 @@ import os, sys
import os.path
import glob
-def _sysread(path, obj):
+def sysread(path, obj):
fp = open(os.path.join(path,obj), "r")
return fp.readline().strip()
@@ -117,7 +117,7 @@ class CpuList(object):
return True
path = os.path.join(CpuList.cpupath,'cpu%d' % n)
if os.path.exists(path):
- return _sysread(path, "online") == 1
+ return sysread(path, "online") == 1
return False
#
@@ -132,7 +132,7 @@ class NumaNode(object):
def __init__(self, path):
self.path = path
self.nodeid = int(os.path.basename(path)[4:].strip())
- self.cpus = CpuList(_sysread(self.path, "cpulist"))
+ self.cpus = CpuList(sysread(self.path, "cpulist"))
self.getmeminfo()
# function for the 'in' operator
--
2.14.3