parameters: (mozconfig_pair, nightly_mozconfig_pair, platform,
                        mozconfigWhitelist={})
return_statement: return success
docstring: Compares mozconfig to nightly_mozconfig and compare to an optional
      whitelist of known differences. mozconfig_pair and nightly_mozconfig_pair
      are pairs containing the mozconfig's identifier and the list of lines in
      the mozconfig.
docstring_summary: Compares mozconfig to nightly_mozconfig and compare to an optional
      whitelist of known differences. mozconfig_pair and nightly_mozconfig_pair
      are pairs containing the mozconfig's identifier and the list of lines in
      the mozconfig.
docstring_tokens: Compares mozconfig to nightly_mozconfig and compare to an optional whitelist of known differences . mozconfig_pair and nightly_mozconfig_pair are pairs containing the mozconfig s identifier and the list of lines in the mozconfig .
function: def verify_mozconfigs(mozconfig_pair, nightly_mozconfig_pair, platform,
                        mozconfigWhitelist={}):
      """Compares mozconfig to nightly_mozconfig and compare to an optional
      whitelist of known differences. mozconfig_pair and nightly_mozconfig_pair
      are pairs containing the mozconfig's identifier and the list of lines in
      the mozconfig."""
  
      # unpack the pairs to get the names, the names are just for
      # identifying the mozconfigs when logging the error messages
      mozconfig_name, mozconfig_lines = mozconfig_pair
      nightly_mozconfig_name, nightly_mozconfig_lines = nightly_mozconfig_pair
  
      missing_args = mozconfig_lines == [] or nightly_mozconfig_lines == []
      if missing_args:
          log.info("Missing mozconfigs to compare for %s" % platform)
          return False
  
      success = True
  
      diffInstance = difflib.Differ()
      diff_result = diffInstance.compare(mozconfig_lines, nightly_mozconfig_lines)
      diffList = list(diff_result)
  
      for line in diffList:
          clean_line = line[1:].strip()
          if (line[0] == '-' or line[0] == '+') and len(clean_line) > 1:
              # skip comment lines
              if clean_line.startswith('#'):
                  continue
              # compare to whitelist
              message = ""
              if line[0] == '-':
                  if platform in mozconfigWhitelist.get('release', {}):
                      if clean_line in \
                              mozconfigWhitelist['release'][platform]:
                          continue
              elif line[0] == '+':
                  if platform in mozconfigWhitelist.get('nightly', {}):
                      if clean_line in \
                              mozconfigWhitelist['nightly'][platform]:
                          continue
                      else:
                          log.warning("%s not in %s %s!" % (
                              clean_line, platform,
                              mozconfigWhitelist['nightly'][platform]))
              else:
                  log.error("Skipping line %s!" % line)
                  continue
              message = "found in %s but not in %s: %s"
              if line[0] == '-':
                  log.error(message % (mozconfig_name,
                                       nightly_mozconfig_name, clean_line))
              else:
                  log.error(message % (nightly_mozconfig_name,
                                       mozconfig_name, clean_line))
              success = False
      return success
function_tokens: def verify_mozconfigs ( mozconfig_pair , nightly_mozconfig_pair , platform , mozconfigWhitelist = { } ) : # unpack the pairs to get the names, the names are just for # identifying the mozconfigs when logging the error messages mozconfig_name , mozconfig_lines = mozconfig_pair nightly_mozconfig_name , nightly_mozconfig_lines = nightly_mozconfig_pair missing_args = mozconfig_lines == [ ] or nightly_mozconfig_lines == [ ] if missing_args : log . info ( "Missing mozconfigs to compare for %s" % platform ) return False success = True diffInstance = difflib . Differ ( ) diff_result = diffInstance . compare ( mozconfig_lines , nightly_mozconfig_lines ) diffList = list ( diff_result ) for line in diffList : clean_line = line [ 1 : ] . strip ( ) if ( line [ 0 ] == '-' or line [ 0 ] == '+' ) and len ( clean_line ) > 1 : # skip comment lines if clean_line . startswith ( '#' ) : continue # compare to whitelist message = "" if line [ 0 ] == '-' : if platform in mozconfigWhitelist . get ( 'release' , { } ) : if clean_line in mozconfigWhitelist [ 'release' ] [ platform ] : continue elif line [ 0 ] == '+' : if platform in mozconfigWhitelist . get ( 'nightly' , { } ) : if clean_line in mozconfigWhitelist [ 'nightly' ] [ platform ] : continue else : log . warning ( "%s not in %s %s!" % ( clean_line , platform , mozconfigWhitelist [ 'nightly' ] [ platform ] ) ) else : log . error ( "Skipping line %s!" % line ) continue message = "found in %s but not in %s: %s" if line [ 0 ] == '-' : log . error ( message % ( mozconfig_name , nightly_mozconfig_name , clean_line ) ) else : log . error ( message % ( nightly_mozconfig_name , mozconfig_name , clean_line ) ) success = False return success