MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / close_handle

Method close_handle

pydevd_attach_to_process/winappdbg/process.py:215–230  ·  view source on GitHub ↗

Closes the handle to the process. @note: Normally you don't need to call this method. All handles created by I{WinAppDbg} are automatically closed when the garbage collector claims them. So unless you've been tinkering with it, setting L{hProcess

(self)

Source from the content-addressed store, hash-verified

213 self.hProcess = hProcess
214
215 def close_handle(self):
216 """
217 Closes the handle to the process.
218
219 @note: Normally you don't need to call this method. All handles
220 created by I{WinAppDbg} are automatically closed when the garbage
221 collector claims them. So unless you've been tinkering with it,
222 setting L{hProcess} to C{None} should be enough.
223 """
224 try:
225 if hasattr(self.hProcess, "close"):
226 self.hProcess.close()
227 elif self.hProcess not in (None, win32.INVALID_HANDLE_VALUE):
228 win32.CloseHandle(self.hProcess)
229 finally:
230 self.hProcess = None
231
232 def get_handle(self, dwDesiredAccess=win32.PROCESS_ALL_ACCESS):
233 """

Callers 5

open_handleMethod · 0.95
clearMethod · 0.95
start_processMethod · 0.45
close_process_handlesMethod · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected