mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-08 22:14:53 +03:00
Exception handling
This commit is contained in:
parent
c50ca2bf3f
commit
32052df9c9
|
@ -73,8 +73,11 @@ INTERNAL_IPS = ["127.0.0.1", "10.0.2.2"]
|
|||
if env("USE_DOCKER") == "yes":
|
||||
import socket
|
||||
|
||||
hostname, _, ips = socket.gethostbyname_ex("host.docker.internal")
|
||||
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
|
||||
try:
|
||||
hostname, _, ips = socket.gethostbyname_ex("host.docker.internal")
|
||||
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
|
||||
except socket.gaierror:
|
||||
pass
|
||||
{%- if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] %}
|
||||
try:
|
||||
_, _, ips = socket.gethostbyname_ex("node")
|
||||
|
|
Loading…
Reference in New Issue
Block a user