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