mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Make destroy network locale independent (#1413)
Make destroy network exceptio rely on e.libvirt_code instead of e.message
This commit is contained in:
@@ -47,7 +47,7 @@ module VagrantPlugins
|
|||||||
)
|
)
|
||||||
rescue Libvirt::RetrieveError => e
|
rescue Libvirt::RetrieveError => e
|
||||||
# this network is already destroyed, so move on
|
# 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'
|
@logger.info 'It is already undefined'
|
||||||
next
|
next
|
||||||
# some other error occured, so raise it again
|
# some other error occured, so raise it again
|
||||||
|
|||||||
Reference in New Issue
Block a user