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

Suppress previous exceptions before raising GandiClientUnknownDomainName

exception
This commit is contained in:
Jonathan Leroy
2020-11-03 22:59:39 +01:00
parent 09a02286f5
commit f3e3f19cd3

View File

@@ -354,12 +354,16 @@ class GandiProvider(BaseProvider):
self._client.zone_create(zone)
self.log.info('_apply: zone has been successfully created')
except GandiClientNotFound:
raise GandiClientUnknownDomainName('This domain is not '
'registred at Gandi. '
'Please register or '
'transfer it here '
'to be able to manage its '
'DNS zone.')
# We suppress existing exception before raising
# GandiClientUnknownDomainName.
e = GandiClientUnknownDomainName('This domain is not '
'registred at Gandi. '
'Please register or '
'transfer it here '
'to be able to manage its '
'DNS zone.')
e.__cause__ = None
raise e
# Force records deletion to be done before creation in order to avoid
# "CNAME record must be the only record" error when an existing CNAME