Skip to content

Commit 9a4b3b3

Browse files
MrMisa93majormoses
authored andcommitted
Fix/nameerror handler graphite status (#66)
* Added prefix to rescue name. * Update CHANGELOG.md * fixup changelog entry * use the proper class for rescuing Signed-off-by: Ben Abrams <me@benabrams.it>
1 parent ff6c91a commit 9a4b3b3

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
55

66
## [Unreleased]
7+
### Fixed
8+
- handler-graphite-status.rb: use proper rescue class (@MrMisa93)
9+
- handler-graphite-notify.rb: use proper rescue class (@majormoses)
710

811
## [3.1.0] - 2018-02-28
912
### Added

bin/handler-graphite-notify.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def handle
3232
graphite.push_to_graphite do |graphite_socket|
3333
graphite_socket.puts message
3434
end
35-
rescue ETIMEDOUT
35+
rescue Errno::ETIMEDOUT
3636
error_msg = "Can't connect to #{settings[json_config]['host']}:#{port} and send message #{message}'"
3737
raise error_msg
3838
end

bin/handler-graphite-status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def handle
3333
graphite.push_to_graphite do |graphite_socket|
3434
graphite_socket.puts message
3535
end
36-
rescue ETIMEDOUT
36+
rescue Errno::ETIMEDOUT
3737
error_msg = "Can't connect to #{settings[json_config]['host']}:#{port} and send message #{message}'"
3838
raise error_msg
3939
end

0 commit comments

Comments
 (0)