summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua M. Keyes <joshua.michael.keyes@gmail.com>2017-09-06 14:31:08 -0700
committerJoshua M. Keyes <joshua.michael.keyes@gmail.com>2017-09-06 14:31:08 -0700
commitc54d076bbaca77f6144bd978ca3198cbdb715c8c (patch)
tree233420313351d509b9c5391bc2d093479ff24932
parenta4174019e55992182a357573022a8ce024284bf7 (diff)
Fix encoding error from FTOS while listing hardware inventory on old firmware versions.
-rw-r--r--lib/oxidized/model/ftos.rb2
1 files changed, 2 insertions, 0 deletions
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