lib/vagrant-libvirt/action/destroy_networks.rb in vagrant-libvirt-0.8.2 vs lib/vagrant-libvirt/action/destroy_networks.rb in vagrant-libvirt-0.9.0
- old
+ new
@@ -66,10 +66,10 @@
end
# Shutdown network first.
# Undefine network.
begin
- libvirt_network.destroy
+ libvirt_network.destroy if libvirt_network.active?
libvirt_network.undefine
@logger.info 'Undefined it'
rescue => e
raise Errors::DestroyNetworkError,
network_name: libvirt_network.name,