mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] add debugging code to avoid becoming mad when things goes wrong
This commit is contained in:
parent
047026df6c
commit
d665984789
1 changed files with 3 additions and 1 deletions
|
@ -820,9 +820,11 @@ def _domain_is_accessible_through_HTTP(ip, domain):
|
|||
def _domain_is_resolved_locally(public_ip, domain):
|
||||
try:
|
||||
ip = socket.gethostbyname(domain)
|
||||
except socket.error:
|
||||
except socket.error as e:
|
||||
logger.debug("Couldn't get domain '%s' ip because: %s" % (domain, e))
|
||||
return False
|
||||
|
||||
logger.debug("Domain '%s' ip is %s, except it to be 127.0.0.1 or %s" % (domain, public_ip))
|
||||
return ip in ["127.0.0.1", public_ip]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue