diff --git a/odi6/odi6.py b/odi6/odi6.py index 986933f..c133b57 100755 --- a/odi6/odi6.py +++ b/odi6/odi6.py @@ -121,7 +121,7 @@ the hostname: {data}" params = { 'fieldType': "AAAA", 'subDomain': self.config['hostname'], - 'target': ipv6, + 'target': f"{ipv6}/128", 'ttl': self.config['ttl'] } if record_exists: @@ -193,16 +193,16 @@ same target, doing nothing.""" except Exception as error: self._log.debug(f"Exception reaching IPv6 URL. {error}") return ipv4, ipv6 - else: - self._log.error( - f"""Unable to determine the IP using + self._log.error( + f"""Unable to determine the IP using '{self.config['web_service_url']}'. Returned data: {result.content}""" - ) + ) else: self._log.error( f"""Selected method '{self.config['ip_method']}' has not been implemented.""" ) + return False def _init_log(self): ''' Initialize log object '''