Exception handling

This commit is contained in:
David Păcioianu 2024-04-08 15:26:08 +03:00 committed by GitHub
parent c50ca2bf3f
commit 32052df9c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,8 +73,11 @@ INTERNAL_IPS = ["127.0.0.1", "10.0.2.2"]
if env("USE_DOCKER") == "yes": if env("USE_DOCKER") == "yes":
import socket import socket
hostname, _, ips = socket.gethostbyname_ex("host.docker.internal") try:
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips] 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'] %} {%- if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] %}
try: try:
_, _, ips = socket.gethostbyname_ex("node") _, _, ips = socket.gethostbyname_ex("node")