add debug nfo

This commit is contained in:
Antonio J. Delgado 2023-10-06 17:24:18 +03:00
parent f3e3bbdde7
commit 0e0450549e
3 changed files with 14 additions and 8 deletions

View file

@ -76,10 +76,17 @@ the hostname: {data}"""
f"""An A record ({record_exists}) exists for this
hostname, updating it."""
)
result = self.ovh.put(
f"/domain/zone/{self.config['domain']}/record/{record_exists['id']}",
**params,
)
uri = f"/domain/zone/{self.config['domain']}/record/{record_exists['id']}"
try:
result = self.ovh.put(
uri,
**params,
)
except Exception as error:
self._log.error(
f"Error updating record with URI {uri}. {error}"
)
sys.exit(1)
else:
result = f"""A record exists {record_exists} with the same
target, doing nothing."""
@ -122,8 +129,7 @@ the hostname: {data}"""
hostname, updating it."""
)
result = self.ovh.put(
f"""/domain/zone/{self.config['domain']}/
record/{record_exists['id']}""",
f"""/domain/zone/{self.config['domain']}/record/{record_exists['id']}""",
**params,
)
else:

View file

@ -7,7 +7,7 @@ Homepage = "https://susurrando.com"
[project]
name = "odi6"
version = "0.0.4"
version = "0.0.5"
description = "Update Dynamic Host IPv6 in OVH"
readme = "README.md"
authors = [{ name = "Antonio J. Delgado", email = "antonio@susurrando.com" }]

View file

@ -1,6 +1,6 @@
[metadata]
name = odi6
version = 0.0.4
version = 0.0.5
[options]
packages = odi6