Skip to content

Commit

Permalink
fix Route53.Client.exceptions.* to route53.exceptions.*
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Aug 7, 2025
1 parent 3ff5647 commit d30fb45
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/ddns-lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
LOGGER = logging.getLogger()
account_id = None
region = None
VERSION = '2.0.6'
VERSION = '2.0.7'

# Read Env variables
DEBUG_LOG_LEVEL = os.environ.get('DebugLogLevel', 'INFO')
Expand Down Expand Up @@ -1749,15 +1749,15 @@ def new_change_resource_recordset(oclient, instance_id, zone_id, host_name, host
# except ClientError as err:
# LOGGER.info(
# f"exception: {instance_id} err {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}")
except Route53.Client.exceptions.NoSuchHostedZone as err:
except route53.exceptions.NoSuchHostedZone as err:

# if 'NoSuchHostedZone' in str(err) and 'No hosted zone found with ID' in str(err):
# LOGGER.error("Hosted zone not found error: %s", str(err) + lineno())
LOGGER.info(
f"exception: NoSuchHostedZone {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}")
update_response = "NoSuchHostedZone"
break
except Route53.Client.exceptions.InvalidChangeBatch as err:
except route53.exceptions.InvalidChangeBatch as err:
# elif 'InvalidChangeBatch' in str(err) and 'is not permitted in zone' in str(err):
# LOGGER.error(
# "Cannot create record - most likely wrong zone name specified: %s", str(err) + lineno())
Expand All @@ -1766,12 +1766,12 @@ def new_change_resource_recordset(oclient, instance_id, zone_id, host_name, host
f"exception: InvalidChangeBatch {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}")
update_response = "InvalidChangeBatch"
break
except Route53.Client.exceptions.InvalidInput as err:
except route53.exceptions.InvalidInput as err:
LOGGER.info(
f"exception: InvalidInput {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}")
update_response = "InvalidInput"
break
except Route53.Client.exceptions.PriorRequestNotComplete as err:
except route53.exceptions.PriorRequestNotComplete as err:
# elif "(Throttling)" in str(err):
LOGGER.info(
f"exception: PriorRequestNotComplete {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}")
Expand Down

0 comments on commit d30fb45

Please sign in to comment.