prevent keyError when double_check_capsul_address returns None
This commit is contained in:
parent
ba0b29462c
commit
fd5d23cf22
@ -63,6 +63,9 @@ def index():
|
||||
if result is not None:
|
||||
vm["ipv4"] = result.ipv4
|
||||
vm["state"] = result.state
|
||||
else:
|
||||
vm["state"] = "unknown"
|
||||
|
||||
|
||||
vms = list(map(
|
||||
lambda x: dict(
|
||||
|
@ -38,6 +38,8 @@
|
||||
<td class="capsul-status waiting-pulse">•</td>
|
||||
{% elif vm['state'] == 'crashed' or vm['state'] == 'blocked' or vm['state'] == 'stopped' %}
|
||||
<td class="capsul-status red">•</td>
|
||||
{% elif vm['state'] == 'unknown' %}
|
||||
<td class="capsul-status">?</td>
|
||||
{% else %}
|
||||
<td class="capsul-status green">•</td>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user