mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Catch ConnectionError from requests package
This commit is contained in:
parent
4c83f2c89d
commit
37d12f964f
1 changed files with 2 additions and 2 deletions
|
@ -194,7 +194,7 @@ def tools_maindomain(auth, old_domain=None, new_domain=None, dyndns=False):
|
|||
if dyndns and len(new_domain.split('.')) >= 3:
|
||||
try:
|
||||
r = requests.get('https://dyndns.yunohost.org/domains')
|
||||
except ConnectionError:
|
||||
except requests.ConnectionError:
|
||||
pass
|
||||
else:
|
||||
dyndomains = json.loads(r.text)
|
||||
|
@ -232,7 +232,7 @@ def tools_postinstall(domain, password, ignore_dyndns=False):
|
|||
if len(domain.split('.')) >= 3 and not ignore_dyndns:
|
||||
try:
|
||||
r = requests.get('https://dyndns.yunohost.org/domains')
|
||||
except ConnectionError:
|
||||
except requests.ConnectionError:
|
||||
pass
|
||||
else:
|
||||
dyndomains = json.loads(r.text)
|
||||
|
|
Loading…
Add table
Reference in a new issue