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

fix: prevent digital ocean provider to crash if records type is not supported

This commit is contained in:
ItsAlex
2019-05-15 12:30:11 +02:00
parent aeeec85ab6
commit 53c2b8d194
2 changed files with 15 additions and 0 deletions

View File

@@ -223,6 +223,10 @@ class DigitalOceanProvider(BaseProvider):
values = defaultdict(lambda: defaultdict(list))
for record in self.zone_records(zone):
_type = record['type']
if _type not in self.SUPPORTS:
self.log.warning('populate: skipping unsupported %s record',
_type)
continue
values[record['name']][record['type']].append(record)
before = len(zone.records)

View File

@@ -1,5 +1,16 @@
{
"domain_records": [{
"id": null,
"type": "SOA",
"name": "@",
"data": null,
"priority": null,
"port": null,
"ttl": null,
"weight": null,
"flags": null,
"tag": null
}, {
"id": 11189874,
"type": "NS",
"name": "@",