Skip to content

Commit 81a8413

Browse files
authored
Use currently available Debian image family (#1777)
1 parent a971361 commit 81a8413

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compute/api/create_instance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
# [START list_instances]
3636
def list_instances(compute, project, zone):
3737
result = compute.instances().list(project=project, zone=zone).execute()
38-
return result['items']
38+
return result['items'] if 'items' in result else None
3939
# [END list_instances]
4040

4141

4242
# [START create_instance]
4343
def create_instance(compute, project, zone, name, bucket):
4444
# Get the latest Debian Jessie image.
4545
image_response = compute.images().getFromFamily(
46-
project='debian-cloud', family='debian-8').execute()
46+
project='debian-cloud', family='debian-9').execute()
4747
source_disk_image = image_response['selfLink']
4848

4949
# Configure the machine

0 commit comments

Comments
 (0)