Skip to content

Commit

Permalink
Fix #1446 realm not displayed in get-all-states and duplicates entrie…
Browse files Browse the repository at this point in the history
…s in daemons list
  • Loading branch information
dguenault committed Jan 9, 2015
1 parent 280fa1d commit a988bd4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shinken/daemons/arbiterdaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,21 @@ def get_all_states(self):
cls = d.__class__
e = {}
ds = [cls.properties, cls.running_properties]

for _d in ds:
for prop in _d:
if hasattr(d, prop):
v = getattr(d, prop)
if prop == "realm":
if hasattr(v,"realm_name"):
e[prop] = v.realm_name
# give a try to a json able object
try:
json.dumps(v)
e[prop] = v
except Exception, exp:
logger.debug('%s', exp)
lst.append(e)
lst.append(e)
return res
get_all_states.doc = doc

Expand Down

0 comments on commit a988bd4

Please sign in to comment.