MCPcopy
hub / github.com/retspen/webvirtcloud / close

Method close

vrtManager/connection.py:191–207  ·  view source on GitHub ↗

closes the connection (if it is active)

(self)

Source from the content-addressed store, hash-verified

189 self.connection = None
190
191 def close(self):
192 """
193 closes the connection (if it is active)
194 """
195 self.connection_state_lock.acquire()
196 try:
197 if self.connected:
198 try:
199 # to-do: handle errors?
200 self.connection.close()
201 except libvirtError:
202 pass
203
204 self.connection = None
205 self.last_error = None
206 finally:
207 self.connection_state_lock.release()
208
209 def __del__(self):
210 if self.connection is not None:

Callers

nothing calls this directly

Calls 2

releaseMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected