diff --git a/ovh_dns_ensure/ovh_dns_ensure.py b/ovh_dns_ensure/ovh_dns_ensure.py index 9f21313..3c6622f 100755 --- a/ovh_dns_ensure/ovh_dns_ensure.py +++ b/ovh_dns_ensure/ovh_dns_ensure.py @@ -101,12 +101,21 @@ class OvhDnsEnsure: self.records = self.ovh.get(f"/domain/zone/{self.config['zone']}/record", **params) self.current_state = 'absent' for record in self.records: + self._log.debug( + "Checking record: %s...", + record + ) data = self.ovh.get(f"/domain/zone/{self.config['zone']}/record/{record}") if data['target'] == self.config['target'] and data['ttl'] == self.config['ttl']: self.current_state = 'same' - self._log.debug('A record with the same type, TTL and target exists. %s', data) + self._log.debug( + 'A record with the same type, TTL and target exists. %s', + data + ) if self.current_state == 'absent' and len(self.records) == 0: - self._log.debug("Doesn't exist a record with that type and target") + self._log.debug( + "Doesn't exist a record with that type and target" + ) elif self.current_state == 'absent' and len(self.records) > 0: self._log.debug( "There are %s records with same type but different target or TTL",