Browse Source

Suppress previous exceptions before raising GandiClientUnknownDomainName

exception
pull/619/head
Jonathan Leroy 5 years ago
parent
commit
f3e3f19cd3
No known key found for this signature in database GPG Key ID: 7A0BCBE3934842EA
1 changed files with 10 additions and 6 deletions
  1. +10
    -6
      octodns/provider/gandi.py

+ 10
- 6
octodns/provider/gandi.py View File

@ -354,12 +354,16 @@ class GandiProvider(BaseProvider):
self._client.zone_create(zone) self._client.zone_create(zone)
self.log.info('_apply: zone has been successfully created') self.log.info('_apply: zone has been successfully created')
except GandiClientNotFound: 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 # Force records deletion to be done before creation in order to avoid
# "CNAME record must be the only record" error when an existing CNAME # "CNAME record must be the only record" error when an existing CNAME


Loading…
Cancel
Save