From cebc629a06295a9cae3c5821b448e11737eddbbe Mon Sep 17 00:00:00 2001 From: Maikel Poot Date: Wed, 25 Sep 2019 14:33:49 +0200 Subject: [PATCH] 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() --- octodns/provider/transip.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/octodns/provider/transip.py b/octodns/provider/transip.py index adde617..050398a 100644 --- a/octodns/provider/transip.py +++ b/octodns/provider/transip.py @@ -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),