Add debug

This commit is contained in:
Antonio J. Delgado 2024-12-09 13:44:14 +02:00
parent 1a8dcfc0d9
commit afe07f9d00

View file

@ -157,7 +157,6 @@ same target, doing nothing."""
if self.config['ip_method'] == 'value': if self.config['ip_method'] == 'value':
if self.config['ip']: if self.config['ip']:
return self.config['ip'], self.config['ipv6'] return self.config['ip'], self.config['ipv6']
else:
self._log.error( self._log.error(
'Selected "value" method but no IP (v4) address indicated.' 'Selected "value" method but no IP (v4) address indicated.'
) )
@ -190,6 +189,10 @@ same target, doing nothing."""
ipv4 = match.group(0).decode() ipv4 = match.group(0).decode()
try: try:
result = s.get(self.config['web_service_url_ipv6']) result = s.get(self.config['web_service_url_ipv6'])
self._log.debug(
"IPv6 web service result: %s",
result.content
)
match = re.match( match = re.match(
br'[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}', br'[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}',
result.content) result.content)