Browse Source

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()
pull/405/head
Maikel Poot 6 years ago
parent
commit
cebc629a06
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      octodns/provider/transip.py

+ 5
- 1
octodns/provider/transip.py 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),


Loading…
Cancel
Save