tuned/tuned-2.2.1-cpu-fix-crash-if-cpupower.patch

33 lines
1.1 KiB
Diff
Raw Normal View History

From 7088da12020efb572f1c1fa52e4c26ab13f53814 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
Date: Mon, 4 Mar 2013 14:32:35 +0100
Subject: [PATCH] cpu plugin: fixed crash if cpupower is installed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
---
tuned/plugins/plugin_cpu.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py
index cf21496..99a979d 100644
--- a/tuned/plugins/plugin_cpu.py
+++ b/tuned/plugins/plugin_cpu.py
@@ -124,9 +124,9 @@ class CPULatencyPlugin(base.Plugin):
governor = None
if self._has_cpupower:
cpu_id = device.lstrip("cpu")
- retcode, lines = tuned.utils.commands.execute(["cpupower", "-c", cpu_id, "frequency-info", "-p"]).splitlines()
+ retcode, lines = tuned.utils.commands.execute(["cpupower", "-c", cpu_id, "frequency-info", "-p"])
if retcode == 0:
- for line in lines:
+ for line in lines.splitlines():
if line.startswith("analyzing"):
continue
l = line.split()
--
1.7.11.7