[PATCH] kvm_stat profiler: Format exception to string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <lmr@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux