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

Enforce values as basic string to fix yaml export error

Fixes an exception in combination
with the yamlProvider as a target
The unmodified value object isn't
represented as string while
building the yaml output
The Exception:
  yaml.representer.RepresenterError:
  ('cannot represent an object', 1.1.1.1)

yaml/representer.py@249,
represent_undefined()
This commit is contained in:
Maikel Poot
2019-09-25 14:33:49 +02:00
parent 59e44b865c
commit cebc629a06

View File

@@ -218,6 +218,9 @@ class TransipProvider(BaseProvider):
def _parse_to_fqdn(self, value):
# Enforce switch from suds.sax.text.Text to string
value = ''+value
# TransIP allows '@' as value to alias the root record.
# this provider won't set an '@' value, but can be an existing record
if value == self.ROOT_RECORD:
@@ -240,7 +243,8 @@ class TransipProvider(BaseProvider):
_values = []
for record in records:
_values.append(record['content'])
# Enforce switch from suds.sax.text.Text to string
_values.append(''+record['content'])
return {
'ttl': self._get_lowest_ttl(records),