There's a small mistake on the kvm_stat profiler:
The contents of the exception message were not
converted to a string before checking if the
problem was due to debugfs not mounted. Let's
fix that.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 client/profilers/kvm_stat/kvm_stat.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/profilers/kvm_stat/kvm_stat.py 
b/client/profilers/kvm_stat/kvm_stat.py
index 8180868..7568a03 100644
--- a/client/profilers/kvm_stat/kvm_stat.py
+++ b/client/profilers/kvm_stat/kvm_stat.py
@@ -25,11 +25,11 @@ class kvm_stat(profiler.profiler):
         try:
             utils.system_output("%s --batch" % self.stat_path)
         except error.CmdError, e:
-            if 'debugfs' in e:
+            if 'debugfs' in str(e):
                 utils.system('mount -t debugfs debugfs /sys/kernel/debug')
             else:
                 raise error.AutotestError('kvm_stat failed due to an '
-                                          'unknown reason: %s' % e)
+                                          'unknown reason: %s' % str(e))
 
 
     def start(self, test):
-- 
1.6.5.2

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to