mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
More general exception to handle other cases (e.g. SSL errors, ...)
This commit is contained in:
parent
e6f1845448
commit
f37a6b43e1
1 changed files with 2 additions and 2 deletions
|
@ -156,10 +156,10 @@ def dyndns_subscribe(operation_logger, subscribe_host="dyndns.yunohost.org", dom
|
|||
# Send subscription
|
||||
try:
|
||||
r = requests.post('https://%s/key/%s?key_algo=hmac-sha512' % (subscribe_host, base64.b64encode(key)), data={'subdomain': domain}, timeout=30)
|
||||
except requests.ConnectionError:
|
||||
except Exception as e:
|
||||
os.system("rm -f %s" % private_file)
|
||||
os.system("rm -f %s" % key_file)
|
||||
raise YunohostError('no_internet_connection')
|
||||
raise YunohostError('dyndns_registration_failed', error=str(e))
|
||||
if r.status_code != 201:
|
||||
os.system("rm -f %s" % private_file)
|
||||
os.system("rm -f %s" % key_file)
|
||||
|
|
Loading…
Add table
Reference in a new issue