(self)
Removes the configuration associated with the hostnames of the container.
Removes the configuration associated with the hostnames of the container.
Removes the configuration associated with the hostnames of the container .
def _unsetup_hostnames(self):
        """ Removes the configuration associated with the hostnames of the container. """
        hostnames = self.options.get('hostnames', [])
        if not hostnames:
            return

        etchosts = EtcHosts()
        for hostname in hostnames:
            logger.info('Unsetting {hostname}. sudo needed.'.format(hostname=hostname))
            etchosts.ensure_binding_absent(hostname)
        if etchosts.changed:
            etchosts.save()
def _unsetup_hostnames ( self ) : hostnames = self . options . get ( 'hostnames' , [ ] ) if not hostnames : return etchosts = EtcHosts ( ) for hostname in hostnames : logger . info ( 'Unsetting {hostname}. sudo needed.' . format ( hostname = hostname ) ) etchosts . ensure_binding_absent ( hostname ) if etchosts . changed : etchosts . save ( )