Fixed incorrect method invokation
This commit is contained in:
@ -22,13 +22,6 @@ domain = os.environ['CERTBOT_DOMAIN']
|
||||
SUBDOMAIN = '_acme-challenge'
|
||||
LIVEDNS_API_URL = 'https://api.gandi.net/v5/livedns/domains'
|
||||
|
||||
response = requests.get(LIVEDNS_API_URL + '/' + domain + '/' +
|
||||
'records' + '/' + SUBDOMAIN, headers=headers)
|
||||
|
||||
#if len(response.json()) > 0 and 'rrset_type' in response.json()[0]:
|
||||
# logger.warning('Warning! Stale authentication token found!')
|
||||
# delete_dns_record(SUBDOMAIN, domain)
|
||||
|
||||
# Create a new TXT record from scratch
|
||||
record = {
|
||||
"rrset_name": SUBDOMAIN,
|
||||
@ -42,7 +35,7 @@ response = requests.post(LIVEDNS_API_URL + '/' + domain
|
||||
|
||||
if not response.ok:
|
||||
logger.error('Could not create proper DNS record for LETSENCRYPT')
|
||||
logger.error(response.raise_for_status)
|
||||
logger.error(response.raise_for_status())
|
||||
exit(1)
|
||||
|
||||
time.sleep(30)
|
||||
|
Reference in New Issue
Block a user