mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] timeout on request to avoid blocking process
This commit is contained in:
parent
3235f5f3fe
commit
31105b8c86
1 changed files with 4 additions and 1 deletions
|
@ -184,11 +184,14 @@ def dyndns_update(dyn_host="dyndns.yunohost.org", domain=None, key=None,
|
|||
try:
|
||||
# Check if domain is registered
|
||||
if requests.get('https://{0}/test/{1}'.format(
|
||||
dyn_host, _domain)).status_code == 200:
|
||||
dyn_host, _domain), timeout=30).status_code == 200:
|
||||
continue
|
||||
except requests.ConnectionError:
|
||||
raise MoulinetteError(errno.ENETUNREACH,
|
||||
m18n.n('no_internet_connection'))
|
||||
except requests.exceptions.Timeout:
|
||||
logger.warning("Correction timed out on {}, skip it".format(
|
||||
'https://{0}/test/{1}'.format(dyn_host, _domain)))
|
||||
domain = _domain
|
||||
key = path
|
||||
break
|
||||
|
|
Loading…
Add table
Reference in a new issue