mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Handle error if node hasn't started yet
This commit is contained in:
parent
26a424e09c
commit
9969f8fa0d
|
@ -70,8 +70,12 @@ if env("USE_DOCKER") == "yes":
|
||||||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||||||
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
|
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
|
||||||
{%- if cookiecutter.js_task_runner == 'Gulp' %}
|
{%- if cookiecutter.js_task_runner == 'Gulp' %}
|
||||||
_, _, ips = socket.gethostbyname_ex("node")
|
try:
|
||||||
INTERNAL_IPS.extend(ips)
|
_, _, ips = socket.gethostbyname_ex("node")
|
||||||
|
INTERNAL_IPS.extend(ips)
|
||||||
|
except socket.gaierror:
|
||||||
|
# The node container isn't started (yet?)
|
||||||
|
pass
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user