mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
Fix image NoneType exception in hcloud_network_info (#56)
This commit is contained in:
parent
0d955cab88
commit
9af840105a
1 changed files with 2 additions and 1 deletions
|
@ -219,12 +219,13 @@ class AnsibleHcloudNetworkInfo(Hcloud):
|
|||
|
||||
servers = []
|
||||
for server in network.servers:
|
||||
image = None if server.image is None else to_native(server.image.name)
|
||||
prepared_server = {
|
||||
"id": to_native(server.id),
|
||||
"name": to_native(server.name),
|
||||
"ipv4_address": to_native(server.public_net.ipv4.ip),
|
||||
"ipv6": to_native(server.public_net.ipv6.ip),
|
||||
"image": to_native(server.image.name),
|
||||
"image": image,
|
||||
"server_type": to_native(server.server_type.name),
|
||||
"datacenter": to_native(server.datacenter.name),
|
||||
"location": to_native(server.datacenter.location.name),
|
||||
|
|
Loading…
Reference in a new issue