From: Lucas Meneghel Rodrigues Subject: [PATCH] virt.kvm_monitor: Future proof migration handling on QMP monitor Date: Wed, 22 Aug 2012 11:43:38 -0300 Message-ID: <1345646618-7522-1-git-send-email-lmr@redhat.com> Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues , Luiz Capitulino To: autotest-kernel@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35579 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756491Ab2HVOnq (ORCPT ); Wed, 22 Aug 2012 10:43:46 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7MEhkLD002695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 Aug 2012 10:43:46 -0400 Sender: kvm-owner@vger.kernel.org List-ID: With d46ad35c74, the exception handling for migrations happening when using a single QMP monitor relies on an exception class that's going to disappear in future versions of QEMU, being replaced by the GenericError class. So let's also handle this exception class. CC: Luiz Capitulino Signed-off-by: Lucas Meneghel Rodrigues --- client/virt/kvm_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/virt/kvm_monitor.py b/client/virt/kvm_monitor.py index 9d8ed87..932725b 100644 --- a/client/virt/kvm_monitor.py +++ b/client/virt/kvm_monitor.py @@ -1155,7 +1155,7 @@ class QMPMonitor(Monitor): try: return self.cmd("migrate", args) except QMPCmdError, e: - if e.data['class'] == 'SockConnectInprogress': + if e.data['class'] in ['SockConnectInprogress', 'GenericError']: logging.debug("Migrate socket connection still initializing...") else: raise e -- 1.7.11.4