[mod] Fixes on 'ttl' option.

This commit is contained in:
Moul 2016-02-23 13:13:36 +01:00
parent 5016482bda
commit 3f1bd53c47
2 changed files with 5 additions and 5 deletions

View file

@ -302,9 +302,9 @@ domain:
arguments: arguments:
domain: domain:
help: Target domain help: Target domain
-ttl: -t:
full: --time-to-live full: --ttl
help: Time to live in secound before DNS servers update this information. Without this option, ttl is set to 3600s, one hour. help: Time To Live (TTL) is second before DNS servers update. Default is 3600 second (i.e. 1 hour).
extra: extra:
pattern: &pattern_ttl pattern: &pattern_ttl
- !!str ^[0-9]+$ - !!str ^[0-9]+$

View file

@ -220,7 +220,7 @@ def domain_remove(auth, domain, force=False):
msignals.display(m18n.n('domain_deleted'), 'success') msignals.display(m18n.n('domain_deleted'), 'success')
def domain_dns_conf(domain, time_to_live): def domain_dns_conf(domain, ttl):
""" """
Generate DNS configuration for a domain Generate DNS configuration for a domain
@ -229,7 +229,7 @@ def domain_dns_conf(domain, time_to_live):
time to live -- Time to live time to live -- Time to live
""" """
ttl = 3600 if time_to_live is None else time_to_live ttl = 3600 if ttl is None else ttl
ip4 = urlopen("http://ip.yunohost.org").read().strip() ip4 = urlopen("http://ip.yunohost.org").read().strip()