A little strange to catch ValueError and raise same exception.
Just allow raising ValueError or raising your LibvirtdError is ok.