From 81a8413528860ff368a3e9f3b7f4e3665588d07f Mon Sep 17 00:00:00 2001 From: Charles Engelke Date: Fri, 19 Oct 2018 16:10:55 -0700 Subject: [PATCH] Use currently available Debian image family (#1777) --- compute/api/create_instance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compute/api/create_instance.py b/compute/api/create_instance.py index e55866a4487d..46418d6f6fb6 100644 --- a/compute/api/create_instance.py +++ b/compute/api/create_instance.py @@ -35,7 +35,7 @@ # [START list_instances] def list_instances(compute, project, zone): result = compute.instances().list(project=project, zone=zone).execute() - return result['items'] + return result['items'] if 'items' in result else None # [END list_instances] @@ -43,7 +43,7 @@ def list_instances(compute, project, zone): def create_instance(compute, project, zone, name, bucket): # Get the latest Debian Jessie image. image_response = compute.images().getFromFamily( - project='debian-cloud', family='debian-8').execute() + project='debian-cloud', family='debian-9').execute() source_disk_image = image_response['selfLink'] # Configure the machine