From f85a50afe8a2836267e9173bb0d4505acef3442f Mon Sep 17 00:00:00 2001 From: Albert Martinez Date: Tue, 10 May 2016 18:11:37 +0200 Subject: Update comware.rb issue #415 skip rogue ^M to comware based devices --- lib/oxidized/model/comware.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb index 9b36e8b..27b70ae 100644 --- a/lib/oxidized/model/comware.rb +++ b/lib/oxidized/model/comware.rb @@ -13,6 +13,8 @@ class Comware < Oxidized::Model cmd :all do |cfg| #cfg.gsub! /^.*\e\[42D/, '' # example how to handle pager + #skip rogue ^M + cfg = cfg.gsub /\r/, '' cfg.each_line.to_a[1..-2].join end -- cgit v1.2.1