def test_hypervisor_conn(uri): """ test hypervisor connecton, if fail an error message in log """ try: handle = libvirt.open(uri) return handle except: log.error(sys.exc_info()[1]) return False