Merge "Don't check libvirt exception if libvirt is absent"
This commit is contained in:
@@ -97,6 +97,8 @@ def refresh_libvirt_connection(conf, klass):
|
||||
|
||||
|
||||
def is_disconnection_exception(e):
|
||||
if not libvirt:
|
||||
return False
|
||||
return (isinstance(e, libvirt.libvirtError)
|
||||
and e.get_error_code() in (libvirt.VIR_ERR_SYSTEM_ERROR,
|
||||
libvirt.VIR_ERR_INTERNAL_ERROR)
|
||||
|
Reference in New Issue
Block a user