testing/chromoting/chromoting_test_utilities.py
def GetJidFromHostLog(host_log_file):
  """Parse the me2me host log to obtain the JID that the host registered.

  Args:
    host_log_file: path to host-log file that should be parsed for a JID.

  Returns:
    host_jid: host-JID if found in host-log, else None
  """
  host_jid = None
  with open(host_log_file, 'r') as log_file:
    for line in log_file:
      # The host JID will be recorded in a line saying 'Signaling
      # connected'.
      if 'Signaling connected. ' in line:
        components = line.split(':')
        host_jid = components[-1].lstrip()
        break

  return host_jid
Parse the me2me host log to obtain the JID that the host registered.

  Args:
    host_log_file: path to host-log file that should be parsed for a JID.

  Returns:
    host_jid: host-JID if found in host-log, else None
  
Parse the me2me host log to obtain the JID that the host registered.
Parse the me2me host log to obtain the JID that the host registered .
def GetJidFromHostLog(host_log_file):
  host_jid = None
  with open(host_log_file, 'r') as log_file:
    for line in log_file:
      if 'Signaling connected. ' in line:
        components = line.split(':')
        host_jid = components[-1].lstrip()
        break
  return host_jid
def GetJidFromHostLog ( host_log_file ) : host_jid = None with open ( host_log_file , 'r' ) as log_file : for line in log_file : if 'Signaling connected. ' in line : components = line . split ( ':' ) host_jid = components [ - 1 ] . lstrip ( ) break return host_jid
Parse the me2me host log to obtain the JID that the host registered.
Parse the me2me host log to obtain the JID that the host registered .
"""Parse the me2me host log to obtain the JID that the host registered.

  Args:
    host_log_file: path to host-log file that should be parsed for a JID.

  Returns:
    host_jid: host-JID if found in host-log, else None
  """ # The host JID will be recorded in a line saying 'Signaling # connected'.
host-JID if found in host-log, else None
host - JID if found in host - log else None
host_jid
host_log_file
path to host-log file that should be parsed for a JID.
path to host - log file that should be parsed for a JID .