From c54d076bbaca77f6144bd978ca3198cbdb715c8c Mon Sep 17 00:00:00 2001 From: "Joshua M. Keyes" Date: Wed, 6 Sep 2017 14:31:08 -0700 Subject: Fix encoding error from FTOS while listing hardware inventory on old firmware versions. --- lib/oxidized/model/ftos.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/ftos.rb b/lib/oxidized/model/ftos.rb index b465271..1c3b8b4 100644 --- a/lib/oxidized/model/ftos.rb +++ b/lib/oxidized/model/ftos.rb @@ -15,6 +15,8 @@ class FTOS < Oxidized::Model end cmd 'show inventory' do |cfg| + # Old versions of FTOS can occasionally return data that triggers encoding errors. + cfg.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => "") comment cfg end -- cgit v1.2.1