From: Lucas Meneghel Rodrigues Subject: [PATCH] kvm_stat profiler: Format exception to string Date: Sun, 17 Jan 2010 16:41:10 -0200 Message-ID: <1263753670-10161-1-git-send-email-lmr@redhat.com> Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues To: autotest@test.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35940 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754354Ab0AQSlQ (ORCPT ); Sun, 17 Jan 2010 13:41:16 -0500 Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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