chrome/updater/test/service/win/proc_util.py
def GetActiveSessionID():
  """Get the active session ID."""
  local_server = win32ts.WTS_CURRENT_SERVER_HANDLE
  for session in win32ts.WTSEnumerateSessions(local_server):
    if session['State'] == win32ts.WTSActive:
      return session['SessionId']

  logging.warning('Unexpected: no active session.')
  return None
Get the active session ID.
Get the active session ID.
Get the active session ID .
def GetActiveSessionID():
  local_server = win32ts.WTS_CURRENT_SERVER_HANDLE
  for session in win32ts.WTSEnumerateSessions(local_server):
    if session['State'] == win32ts.WTSActive:
      return session['SessionId']
  logging.warning('Unexpected: no active session.')
  return None
def GetActiveSessionID ( ) : local_server = win32ts . WTS_CURRENT_SERVER_HANDLE for session in win32ts . WTSEnumerateSessions ( local_server ) : if session [ 'State' ] == win32ts . WTSActive : return session [ 'SessionId' ] logging . warning ( 'Unexpected: no active session.' ) return None
Get the active session ID.
Get the active session ID .
"""Get the active session ID."""