Loading helpers.py +6 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,9 @@ def fab_add_to_hosts(ip, site_hostname): :param site_hostname: :return: """ if not site_hostname: return if confirm(green('Do you want add to the /etc/hosts the line "{} {}"? ' 'If you say yes you will be able to visit the site using a more frienldy url ' '"http://{}".'.format(ip, site_hostname, site_hostname))): Loading @@ -123,6 +126,9 @@ def fab_remove_from_hosts(site_hostname): :param site_hostname: :return: """ if not site_hostname: return print(green('Enter your password to remove the {} from your /etc/hosts file'.format(site_hostname))) local('sudo sed -i "/{}/d" /etc/hosts'.format(site_hostname)) Loading Loading
helpers.py +6 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,9 @@ def fab_add_to_hosts(ip, site_hostname): :param site_hostname: :return: """ if not site_hostname: return if confirm(green('Do you want add to the /etc/hosts the line "{} {}"? ' 'If you say yes you will be able to visit the site using a more frienldy url ' '"http://{}".'.format(ip, site_hostname, site_hostname))): Loading @@ -123,6 +126,9 @@ def fab_remove_from_hosts(site_hostname): :param site_hostname: :return: """ if not site_hostname: return print(green('Enter your password to remove the {} from your /etc/hosts file'.format(site_hostname))) local('sudo sed -i "/{}/d" /etc/hosts'.format(site_hostname)) Loading