mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Add warn for unparsable dynamic records
This commit is contained in:
@@ -780,11 +780,15 @@ class Ns1Provider(BaseProvider):
|
|||||||
if 'pool:' in first_answer_note:
|
if 'pool:' in first_answer_note:
|
||||||
return self._data_for_dynamic(_type, record)
|
return self._data_for_dynamic(_type, record)
|
||||||
# If not, it can't be parsed. Let it be an empty record
|
# If not, it can't be parsed. Let it be an empty record
|
||||||
|
self.log.warn('Cannot parse %s dynamic record due to missing '
|
||||||
try:
|
'pool name in first answer note, treating it as '
|
||||||
value = record['short_answers'][0]
|
'an empty record', record['domain'])
|
||||||
except (IndexError, KeyError):
|
|
||||||
value = None
|
value = None
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
value = record['short_answers'][0]
|
||||||
|
except IndexError:
|
||||||
|
value = None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'ttl': record['ttl'],
|
'ttl': record['ttl'],
|
||||||
|
|||||||
Reference in New Issue
Block a user