#NEWLINE# def _output_addn_hosts_file( self ) : #NEWLINE# #INDENT# 'Writes a dnsmasq compatible additional hosts file.\n\n        The generated file is sent to the --addn-hosts option of dnsmasq,\n        and lists the hosts on the network which should be resolved even if\n        the dnsmasq instance did not give a lease to the host (see the\n        `_output_hosts_file` method).\n        Each line in this file is in the same form as a standard /etc/hosts\n        file.\n        ' #NEWLINE# buf = six . StringIO ( ) #NEWLINE# for host_tuple in self . _iter_hosts ( ) : #NEWLINE# #INDENT# ( port , alloc , hostname , fqdn , no_dhcp , no_opts ) = host_tuple #NEWLINE# if alloc : #NEWLINE# #INDENT# buf . write ( ( '%s\t%s %s\n' % ( alloc . ip_address , fqdn , hostname ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# addn_hosts = self . get_conf_file_name ( 'addn_hosts' ) #NEWLINE# common_utils . replace_file ( addn_hosts , buf . getvalue ( ) ) #NEWLINE# return addn_hosts