All pastes #791558 Raw Edit

Bloody ruby-snmp

public ruby v1 · immutable
·published 2007-11-20 23:16 UTC
rendered paste body
  def query(*args)    t = @manager.get(args)    h[t.varbind_list[0].name.to_s.sub!(/\.\d+$/, '')] = t.varbind_list[0].value.to_s    response = @manager.get_next(args)    response.each_varbind do |vb|      h[vb.name.to_s.sub!(/\.\d+$/, '')] = vb.value.to_s    end    @results = h  end