From mboxrd@z Thu Jan 1 00:00:00 1970 From: yili Subject: [PATCH v5] Xend: handle TapdiskException when creat device Date: Sat, 22 Mar 2014 14:28:21 -0400 Message-ID: <1395512901-6566-1-git-send-email-yilikernel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, Yi Li List-Id: xen-devel@lists.xenproject.org From: Yi Li Handle the TapdiskException when creat device failed for release some info. Signed-off-by: Yi Li --- tools/python/xen/xend/XendDomainInfo.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 8d4ff5c..2270ab1 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -65,7 +65,7 @@ from xen.xend.XendConstants import * from xen.xend.XendAPIConstants import * from xen.xend.XendCPUPool import XendCPUPool from xen.xend.server.DevConstants import xenbusState -from xen.xend.server.BlktapController import TapdiskController +from xen.xend.server.BlktapController import TapdiskController, TapdiskException from xen.xend.XendVMMetrics import XendVMMetrics @@ -861,7 +861,7 @@ class XendDomainInfo: # blktap1 dev_type = self.getBlockDeviceClass(devid) self._waitForDevice(dev_type, devid) - except VmError, ex: + except (VmError, TapdiskException), ex: del self.info['devices'][dev_uuid] if dev_type == 'pci': for dev in dev_config_dict['devs']: -- 1.6.0.2