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

Method close_handle

pydevd_attach_to_process/winappdbg/module.py:406–421  ·  view source on GitHub ↗

Closes the handle to the module. @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{hFile} to

(self)

Source from the content-addressed store, hash-verified

404 self.hFile = hFile
405
406 def close_handle(self):
407 """
408 Closes the handle to the module.
409
410 @note: Normally you don't need to call this method. All handles
411 created by I{WinAppDbg} are automatically closed when the garbage
412 collector claims them. So unless you've been tinkering with it,
413 setting L{hFile} to C{None} should be enough.
414 """
415 try:
416 if hasattr(self.hFile, "close"):
417 self.hFile.close()
418 elif self.hFile not in (None, win32.INVALID_HANDLE_VALUE):
419 win32.CloseHandle(self.hFile)
420 finally:
421 self.hFile = None
422
423 def get_handle(self):
424 """

Callers 2

open_handleMethod · 0.95
clearMethod · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected