diff options
author | Ali Borhani <aliborhani1@gmail.com> | 2017-07-28 11:44:36 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-28 11:44:36 +0430 |
commit | ec3feae29aec46529d86ec57c9a3f32c55c4c420 (patch) | |
tree | b1ae05e15c5808aea30f7a488d20257dd2d3ee8d /python.d | |
parent | 2d86d96378ab3320d1c5e47fd1c1b1290795b63c (diff) |
Fix None value for Seconds_Behind_Master
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/mysql.chart.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python.d/mysql.chart.py b/python.d/mysql.chart.py index cdabe971de..af65f08708 100644 --- a/python.d/mysql.chart.py +++ b/python.d/mysql.chart.py @@ -117,7 +117,10 @@ GLOBAL_STATS = [ 'Connection_errors_tcpwrap'] def slave_seconds(value): - return value if value is not '' else -1 + try: + return int(value) + except ValueError: + return -1 def slave_running(value): return 1 if value == 'Yes' else -1 |