1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

add localhost is up checking

This commit is contained in:
catborise 2020-05-19 00:07:46 +03:00 committed by catborise
parent b48b112a40
commit 0c72ccd066

View file

@ -321,10 +321,13 @@ class wvmConnectionManager(object):
socket_host.connect((hostname, TCP_PORT))
if conn_type == CONN_TLS:
socket_host.connect((hostname, TLS_PORT))
if conn_type == CONN_SOCKET:
socket_host = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
socket_host.connect('/var/run/libvirt/libvirt-sock')
socket_host.close()
return True
except Exception as err:
return err
except Exception:
return False
connection_manager = wvmConnectionManager(