def _MakeDosListIntoYaml(dos_list):
 statements = ['blacklist:']
 for entry in dos_list:
  statements += entry.ToYaml()
 return ('\n'.join(statements) + '\n')

def _MakeDosListIntoYaml ( dos_list ) : statements = [ 'blacklist:' ] for entry in dos_list : statements += entry . ToYaml ( ) return ( '\n' . join ( statements ) + '\n' )
converts yaml statement list of blacklisted ips into a string .