Try Catch around the ip put
New Bug found, uggly patched with this, details in #3
This commit is contained in:
parent
61f952f044
commit
439716ed67
1 changed files with 10 additions and 4 deletions
|
@ -64,8 +64,11 @@ def main():
|
||||||
if fullname in dns_names['A']:
|
if fullname in dns_names['A']:
|
||||||
new_dnsrecords = {"name": fullname, "type": "A", "content": ip_address_new}
|
new_dnsrecords = {"name": fullname, "type": "A", "content": ip_address_new}
|
||||||
print(f"Sending request {new_dnsrecords}")
|
print(f"Sending request {new_dnsrecords}")
|
||||||
|
try;
|
||||||
r = cf.zones.dns_records.patch(zone_id, dns_record_id, data=new_dnsrecords)
|
r = cf.zones.dns_records.patch(zone_id, dns_record_id, data=new_dnsrecords)
|
||||||
print(r)
|
print(r)
|
||||||
|
except:
|
||||||
|
print("Error pushing entry")
|
||||||
|
|
||||||
case '6':
|
case '6':
|
||||||
print("Updating IPv6")
|
print("Updating IPv6")
|
||||||
|
@ -84,8 +87,11 @@ def main():
|
||||||
if fullname in dns_names['AAAA']:
|
if fullname in dns_names['AAAA']:
|
||||||
new_dnsrecords = {"name": fullname, "type": "AAAA", "content": ip_address_new}
|
new_dnsrecords = {"name": fullname, "type": "AAAA", "content": ip_address_new}
|
||||||
print(f"Sending request {new_dnsrecords}")
|
print(f"Sending request {new_dnsrecords}")
|
||||||
|
try:
|
||||||
r = cf.zones.dns_records.patch(zone_id, dns_record_id, data=new_dnsrecords)
|
r = cf.zones.dns_records.patch(zone_id, dns_record_id, data=new_dnsrecords)
|
||||||
print(r)
|
print(r)
|
||||||
|
except:
|
||||||
|
print("Error pushing entry")
|
||||||
case 'skipping':
|
case 'skipping':
|
||||||
print("Done")
|
print("Done")
|
||||||
case other:
|
case other:
|
||||||
|
|
Loading…
Reference in a new issue