diff mbox

kvm_stat profiler: Format exception to string

Message ID 1263753670-10161-1-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues Jan. 17, 2010, 6:41 p.m. UTC
None
diff mbox

Patch

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):