1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Update multi-value PTR warn to supports_warn_or_except

This commit is contained in:
Ross McFarland
2021-08-18 12:35:49 -07:00
parent 53a21b649a
commit 65f0bfc243
2 changed files with 5 additions and 3 deletions

View File

@@ -52,9 +52,10 @@ class BaseProvider(BaseSource):
for record in desired.records:
if record._type == 'PTR' and len(record.values) > 1:
# replace with a single-value copy
self.log.warn('does not support multi-value PTR records; '
'will use only %s for %s', record.value,
record.fqdn)
self.supports_warn_or_except('does not support multi-value '
'PTR records; will use only {} '
'for {}'.format(record.value,
record.fqdn))
record = record.copy()
record.values = [record.value]