Oh right, easy help.

LZ

On Fri, Jan 03, 2014 at 12:17:16AM -0800, Dominic Cleal wrote:
> > +
> > +    # we support only one subnet
> > +    def loadSubnets
> > +      super
> > +      doc = REXML::Document.new xml = dump_xml
> > +      doc.elements.each("network/ip") do |e|
> > +        next if e.attributes["family"] == "ipv6"
> > +        netmask = e.attributes["netmask"]
> > +        gateway = e.attributes["address"]
> > +        network = IPAddr.new(gateway).mask(netmask).to_s
> > +        subnet = Proxy::DHCP::Subnet.new(self, network, netmask)
> > +        # TODO - where should I store subnet info? this is not working...
> > +        subnet.options["gateway"] = gateway
> > +      end
> > +    rescue Exception => e
> > +      logger.error "DNS virsh provider error: unable to parse virsh XML - #{e}"
> 
> Sorry, what I was trying to say is that this rescue block catches both XML parsing errors and dump_xml errors (which might be the 'virsh' command execution failing).  From the message I was only expecting it to catch the XML parse errors?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/theforeman/smart-proxy/pull/116/files#r8630561

-- 
Later,

 Lukas "lzap" Zapletal
 irc: lzap #theforeman