You should check to see if the network is active before attempting to destroy() to prevent libvirt from speaking out and saying something scary like "libvir: Network Driver error : Requested operation is not valid: network is not active".