commit: 38945e1b33ea90486f495681a6c7c2ba6e3a0fd7
Author: Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Wed Apr 30 12:12:25 2014 +0000
Commit: Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Wed Apr 30 12:12:25 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=38945e1b
Be more resilient to status.json update failures
---
lib/helpers.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/helpers.rb b/lib/helpers.rb
index 9b37c49..b321f0a 100644
--- a/lib/helpers.rb
+++ b/lib/helpers.rb
@@ -35,6 +35,7 @@ helpers do
end
def service_status(service)
+ return 'na' unless ServiceRegistry.instance.services.has_key? service
active_notices = NoticeStore.instance.active_notices_for(service)
unless (forced_state = get_forced_state(active_notices)) == nil
@@ -130,4 +131,4 @@ helpers do
end
}.compact.reverse.join(' ')
end
-end
\ No newline at end of file
+end