[Kimchi-devel] [PATCH] Fix PowerOptions availability

Jose Ricardo Ziviani joserz at linux.vnet.ibm.com
Thu Mar 26 16:17:43 UTC 2015


 - When we run tuned-adm without parameters it returns code 2, which
   will fail our check condition and Power Options would never be
   displayed. This commit add a parameter that simply list the profiles,
   this will return 0.
---
 models/powermanagement.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/models/powermanagement.py b/models/powermanagement.py
index 0bb3dcc..7600024 100644
--- a/models/powermanagement.py
+++ b/models/powermanagement.py
@@ -62,7 +62,7 @@ class PowerProfilesModel(object):
         return profiles
 
     def is_feature_available(self):
-        output, error, returncode = run_command(['tuned-adm'])
+        output, error, returncode = run_command(['tuned-adm', 'list'])
         return returncode == 0
 
 
-- 
1.9.1




More information about the Kimchi-devel mailing list