parameters: (data=None)
return_statement: return {'success': True}
docstring: Update the TLD list in the database.
  
      :param data: The TLD data.
      :type data: file handle.
      :returns: dict with key "success" (boolean)
docstring_summary: Update the TLD list in the database.
docstring_tokens: Update the TLD list in the database .
function: def update_tlds(data=None):
      """
      Update the TLD list in the database.
  
      :param data: The TLD data.
      :type data: file handle.
      :returns: dict with key "success" (boolean)
      """
  
      if not data:
          return {'success': False}
      line = data.readline()
      while line:
          line = line.rstrip()
          if line and not line.startswith('//'):
              line = line.replace("*.", "")
              TLD.objects(tld=line).update_one(set__tld=line, upsert=True)
          line = data.readline()
  
      # Update the package local tld_parser with the new domain info
      tld_parser = etld()
  
      return {'success': True}
function_tokens: def update_tlds ( data = None ) : if not data : return { 'success' : False } line = data . readline ( ) while line : line = line . rstrip ( ) if line and not line . startswith ( '//' ) : line = line . replace ( "*." , "" ) TLD . objects ( tld = line ) . update_one ( set__tld = line , upsert = True ) line = data . readline ( ) # Update the package local tld_parser with the new domain info tld_parser = etld ( ) return { 'success' : True }