Created
April 22, 2014 11:06
-
-
Save anonymous/11174357 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/openstack_dashboard/dashboards/admin/info/tables.py 2014-04-22 13:04:25.631852097 +0200 | |
+++ b/openstack_dashboard/dashboards/admin/info/tables.py 2014-04-22 13:05:17.038038608 +0200 | |
@@ -57,8 +57,10 @@ | |
def get_hosts(zone): | |
hosts = zone.hosts | |
host_details = [] | |
+ if hosts is None: | |
+ return [] | |
for name, services in hosts.items(): | |
- up = all([s['active'] and s['available'] for k, s in services.items()]) | |
+ up = all(s['active'] and s['available'] for s in services.values()) | |
up = _("Services Up") if up else _("Services Down") | |
host_details.append("%(host)s (%(up)s)" % {'host': name, 'up': up}) | |
return host_details |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment