parameters: (reviewer)
docstring: Validate a reviewer -- either a nickname or an email addres.
  
    Args:
      reviewer: A nickname or an email address.
  
    Calls ErrorExit() if it is an invalid email address.
docstring_summary: Validate a reviewer -- either a nickname or an email addres.
docstring_tokens: Validate a reviewer -- either a nickname or an email addres .
function: def CheckReviewer(reviewer):
    """Validate a reviewer -- either a nickname or an email addres.
  
    Args:
      reviewer: A nickname or an email address.
  
    Calls ErrorExit() if it is an invalid email address.
    """
    if "@" not in reviewer:
      return  # Assume nickname
    parts = reviewer.split("@")
    if len(parts) > 2:
      ErrorExit("Invalid email address: %r" % reviewer)
    assert len(parts) == 2
    if "." not in parts[1]:
      ErrorExit("Invalid email address: %r" % reviewer)
function_tokens: def CheckReviewer ( reviewer ) : if "@" not in reviewer : return # Assume nickname parts = reviewer . split ( "@" ) if len ( parts ) > 2 : ErrorExit ( "Invalid email address: %r" % reviewer ) assert len ( parts ) == 2 if "." not in parts [ 1 ] : ErrorExit ( "Invalid email address: %r" % reviewer )