summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/comware.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/comware.rb')
-rw-r--r--lib/oxidized/model/comware.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb
index bfc1524..9b36e8b 100644
--- a/lib/oxidized/model/comware.rb
+++ b/lib/oxidized/model/comware.rb
@@ -1,7 +1,8 @@
class Comware < Oxidized::Model
# HP (A-series)/H3C/3Com Comware
- prompt /^(<[\w.-]+>)$/
+ # sometimes the prompt might have a leading nul
+ prompt /^\0*(<[\w.-]+>)$/
comment '# '
# example how to handle pager
@@ -38,7 +39,7 @@ class Comware < Oxidized::Model
end
cmd 'display version' do |cfg|
- cfg = cfg.each_line.select {|l| not l.match /uptime/ }.join
+ cfg = cfg.each_line.select {|l| not l.match /uptime/i }.join
comment cfg
end