]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Don't explode if get_status fails
authorZack Cerza <zack.cerza@inktank.com>
Mon, 8 Sep 2014 19:15:04 +0000 (13:15 -0600)
committerZack Cerza <zack.cerza@inktank.com>
Mon, 8 Sep 2014 19:15:04 +0000 (13:15 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/provision.py

index 662f9c975bc3fc70d33bcb655496bba114e8e630..79377ea8ce68b83ed002ee7bdb99841b546b46ae 100644 (file)
@@ -102,7 +102,7 @@ def destroy_if_vm(ctx, machine_name):
     Return False only on vm downburst failures.
     """
     status_info = get_status(machine_name)
-    if not status_info.get('is_vm', False):
+    if not status_info or not status_info.get('is_vm', False):
         return True
     phys_host = decanonicalize_hostname(status_info['vm_host']['name'])
     destroyMe = decanonicalize_hostname(machine_name)