Don't fail to delete the VM because it wasn't running
authorEric Price <ecprice@mit.edu>
Wed, 10 Oct 2007 00:10:18 +0000 (20:10 -0400)
committerEric Price <ecprice@mit.edu>
Wed, 10 Oct 2007 00:10:18 +0000 (20:10 -0400)
svn path=/trunk/web/; revision=159

templates/main.py

index c6006f4..ccef044 100755 (executable)
@@ -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: