Skip to content

Commit

Permalink
Merge pull request #377 from biokys/master
Browse files Browse the repository at this point in the history
Fix error, when any plugin returns NoneType instead of number value.
  • Loading branch information
gmr committed Jan 28, 2015
2 parents 84f103a + 721e6d2 commit bfc6459
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions newrelic_plugin_agent/plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ def metric_payload(self, value, min_value=None, max_value=None, count=None,
:rtype: dict
"""
if not value:
value = 0

if isinstance(value, basestring):
value = 0

Expand Down

0 comments on commit bfc6459

Please sign in to comment.