mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'stable' into testing
This commit is contained in:
commit
d4bd34451a
1 changed files with 2 additions and 2 deletions
|
@ -31,6 +31,7 @@ import shutil
|
||||||
import json
|
import json
|
||||||
import yaml
|
import yaml
|
||||||
import errno
|
import errno
|
||||||
|
import requests
|
||||||
from urllib import urlopen
|
from urllib import urlopen
|
||||||
|
|
||||||
from moulinette.core import MoulinetteError
|
from moulinette.core import MoulinetteError
|
||||||
|
@ -95,12 +96,11 @@ def domain_add(auth, domain, dyndns=False):
|
||||||
if dyndns:
|
if dyndns:
|
||||||
if len(domain.split('.')) < 3:
|
if len(domain.split('.')) < 3:
|
||||||
raise MoulinetteError(errno.EINVAL, m18n.n('domain_dyndns_invalid'))
|
raise MoulinetteError(errno.EINVAL, m18n.n('domain_dyndns_invalid'))
|
||||||
import requests
|
|
||||||
from yunohost.dyndns import dyndns_subscribe
|
from yunohost.dyndns import dyndns_subscribe
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = requests.get('https://dyndns.yunohost.org/domains')
|
r = requests.get('https://dyndns.yunohost.org/domains')
|
||||||
except ConnectionError:
|
except requests.ConnectionError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
dyndomains = json.loads(r.text)
|
dyndomains = json.loads(r.text)
|
||||||
|
|
Loading…
Add table
Reference in a new issue