- # Configure report handlers
-
- exception_handlers << email_handler
- report_handlers << email_handler
-
-rescue LoadError
-
- # Ignore errors in case required gems not installed yet
-
-end
+exception_handlers.delete_if { |h| h.is_a?(Chef::Handler::Email) } << email_handler
+report_handlers.delete_if { |h| h.is_a?(Chef::Handler::Email) } << email_handler