Skip to content

Commit

Permalink
[mesos] cast error message to string
Browse files Browse the repository at this point in the history
`self.service_check` expect a string message. Otherwise it breaks the
emitter `json.dumps()`.
  • Loading branch information
degemer committed May 12, 2015
1 parent a911a35 commit a874802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checks.d/mesos.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_json(self, url, timeout):
msg = "%s seconds timeout when hitting %s" % (timeout, url)
status = AgentCheck.CRITICAL
except Exception as e:
msg = e.message
msg = str(e)
status = AgentCheck.CRITICAL
finally:
self.service_check(self.SERVICE_CHECK_NAME, status, tags=tags, message=msg)
Expand Down

0 comments on commit a874802

Please sign in to comment.