Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

Commit

Permalink
Suppress Nokogiri from spitting out errors to stdout.
Browse files Browse the repository at this point in the history
  • Loading branch information
saulius committed Nov 26, 2012
1 parent 8c489aa commit 94ae5e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tariff_importer/importers/taric_importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def import
ActiveSupport::Notifications.instrument("taric_imported.tariff_importer", path: path) do
begin
handler = File.open(path, "r")
reader = Nokogiri::XML::Reader(handler)
reader = Nokogiri::XML::Reader(handler, nil, nil, Nokogiri::XML::ParseOptions::RECOVER | Nokogiri::XML::ParseOptions::NOERROR | Nokogiri::XML::ParseOptions::NONET)
reader.each do |node|
if node.name == self.transaction_node && node.node_type == self.opening_element
xml = Nokogiri::XML.parse(node.outer_xml)
Expand Down

0 comments on commit 94ae5e8

Please sign in to comment.