summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2021-10-21 17:09:15 -0400
committerJohn Kacur <jkacur@redhat.com>2021-10-21 17:11:41 -0400
commitf785fce574c36f9e73bdb26f9fce8074fd807a47 (patch)
tree42c1a36c3ada053dc67c7ca190483decd18d2519
parent253f8dda2a1a4321e2f45ed9069d6b18a3e80a02 (diff)
downloadtuna-f785fce574c36f9e73bdb26f9fce8074fd807a47.tar.gz
tuna: Remove is_s390 from tuna and use the python-linux-procfs function
is_s390 was moved to python-linux-procfs a long time ago, it's safe to remove it from tuna and use the version in python-linux-procfs Signed-off-by: John Kacur <jkacur@redhat.com>
-rwxr-xr-xtuna/tuna.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/tuna/tuna.py b/tuna/tuna.py
index 1e39222..0cd8c3f 100755
--- a/tuna/tuna.py
+++ b/tuna/tuna.py
@@ -317,19 +317,13 @@ def affinity_remove_cpus(affinity, cpus, nr_cpus):
affinity = list(set(affinity) - set(cpus))
return affinity
-# True if machine is s390 or s390x
-def is_s390():
- machine = platform.machine()
- if re.search('s390', machine):
- return True
- return False
# Shound be moved to python_linux_procfs.interrupts, shared with interrupts.parse_affinity, etc.
def parse_irq_affinity_filename(filename, nr_cpus):
try:
f = open("/proc/irq/%s" % filename)
except IOError as err:
- if is_s390():
+ if procfs.is_s390():
print("This operation is not supported on s390", file=sys.stderr)
print("tuna: %s" % err, file=sys.stderr)
sys.exit(2)