lib/vagrant-libvirt/action/destroy_networks.rb in vagrant-libvirt-0.7.0 vs lib/vagrant-libvirt/action/destroy_networks.rb in vagrant-libvirt-0.8.0

- old
+ new

@@ -45,10 +45,10 @@ libvirt_network = env[:machine].provider.driver.connection.client.lookup_network_by_uuid( network_uuid ) rescue Libvirt::RetrieveError => e # this network is already destroyed, so move on - if e.message =~ /Network not found/ + if e.libvirt_code == ProviderLibvirt::Util::ErrorCodes::VIR_ERR_NO_NETWORK @logger.info 'It is already undefined' next # some other error occured, so raise it again else raise e