add debug nfo
This commit is contained in:
parent
f3e3bbdde7
commit
0e0450549e
3 changed files with 14 additions and 8 deletions
18
odi6/odi6.py
18
odi6/odi6.py
|
@ -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:
|
||||
|
|
|
@ -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" }]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[metadata]
|
||||
name = odi6
|
||||
version = 0.0.4
|
||||
version = 0.0.5
|
||||
|
||||
[options]
|
||||
packages = odi6
|
||||
|
|
Loading…
Reference in a new issue