From: Eric Price Date: Wed, 10 Oct 2007 00:10:18 +0000 (-0400) Subject: Don't fail to delete the VM because it wasn't running X-Git-Tag: sipb-xen-www/1~73 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/b206601d099e9ca986013e89bac3344266ec318e Don't fail to delete the VM because it wasn't running svn path=/trunk/web/; revision=159 --- diff --git a/templates/main.py b/templates/main.py index c6006f4..ccef044 100755 --- a/templates/main.py +++ b/templates/main.py @@ -510,7 +510,10 @@ def getDiskInfo(data_dict, machine): def deleteVM(machine): """Delete a VM.""" - remctl('destroy', machine.name) + try: + remctl('destroy', machine.name) + except: + pass transaction = ctx.current.create_transaction() delete_disk_pairs = [(machine.name, d.guest_device_name) for d in machine.disks] try: