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

Force the value passed to FQDN to be a str

This commit is contained in:
Ross McFarland
2021-02-04 10:48:45 -08:00
parent 9aa22da1f7
commit cda56a3ca7

View File

@@ -758,7 +758,9 @@ class _TargetValue(object):
reasons.append('empty value')
elif not data:
reasons.append('missing value')
elif not FQDN(data, allow_underscores=True).is_valid:
# NOTE: FQDN complains if the data it receives isn't a str, it doesn't
# allow unicode... This is likely specific to 2.7
elif not FQDN(str(data), allow_underscores=True).is_valid:
reasons.append('{} value "{}" is not a valid FQDN'
.format(_type, data))
elif not data.endswith('.'):