summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDanilo Sousa <danilopopeye@users.noreply.github.com>2017-09-11 15:38:45 -0300
committerGitHub <noreply@github.com>2017-09-11 15:38:45 -0300
commitf454f1de85673e0d495c6688c4d6be42a5f4c163 (patch)
tree380255be0d5f601e9b5e03093585db60d14cf363 /lib
parent340a9e14471048fc9ea882a3b38783896250f5e0 (diff)
parentc54d076bbaca77f6144bd978ca3198cbdb715c8c (diff)
Merge pull request #1015 from jmkeyes/ftos-encoding-error
Fix Encoding::UndefinedConversionError from FTOS
Diffstat (limited to 'lib')
-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