

@classmethod
def from_thread(cls, access=constants.GENERAL.MAXIMUM_ALLOWED):
    hProcess = win32api.GetCurrentProcess()
    hThread = win32api.GetCurrentThread()
    try:
        return cls(wrapped(win32security.OpenThreadToken, access, access, True), hProcess, hThread)
    except x_no_token:
        return cls(wrapped(win32security.OpenProcessToken, hProcess, access), hProcess, hThread)

dataset/ETHPy150Open tjguk/winsys/winsys/_security/_tokens.py Token.from_thread/VarMisuse@50/68 `hThread`->`access`