lib/sloe/junos.rb in sloe-0.5.3 vs lib/sloe/junos.rb in sloe-0.5.4
- old
+ new
@@ -8,9 +8,10 @@
super( args, &block )
end
def cli(cmd_str, attrs = { :format => 'text' })
attrs[:format] ||= 'text'
- self.rpc.command(cmd_str, attrs).text
+ reply = self.rpc.command(cmd_str, attrs)
+ reply.respond_to?(:text) ? reply.text : reply
end
end
end