diff options
-rw-r--r-- | apex/clean.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apex/clean.py b/apex/clean.py index f56287e1..3e33c8e4 100644 --- a/apex/clean.py +++ b/apex/clean.py @@ -114,7 +114,13 @@ def clean_networks(): logging.debug("Destroying virsh network: {}".format(network)) if virsh_net.isActive(): virsh_net.destroy() - virsh_net.undefine() + try: + virsh_net.undefine() + except libvirt.libvirtError as e: + if 'Network not found' in e.get_error_message(): + logging.debug('Network already undefined') + else: + raise def main(): |