@depends(_HAS_WIN32TS_DEPENDENCIES)
def disconnect_session(session_id):
 try:
  win32ts.WTSDisconnectSession(win32ts.WTS_CURRENT_SERVER_HANDLE, session_id, True)
 except PyWinError as error:
  _LOG.error('Error calling WTSDisconnectSession: %s', error)
  return False
 return True

@ depends ( _HAS_WIN32TS_DEPENDENCIES ) def disconnect_session ( session_id ) : try : win32ts . WTSDisconnectSession ( win32ts . WTS_CURRENT_SERVER_HANDLE , session_id , True ) except PyWinError as error : _LOG . error ( 'Error calling WTSDisconnectSession: %s' , error ) return False return True
disconnect a session .