Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 28, 2023
1 parent fbd19cd commit 0a614cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 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.0rc2'
VERSION = '2.0.0rc3'

# Read Env variables
DEBUG_LOG_LEVEL = os.environ.get('DebugLogLevel', 'INFO')
Expand Down Expand Up @@ -3064,7 +3064,7 @@ def process_tags_flags(tags):
"""

# tag_dict = {tag['Key'].lstrip().lower(): tag['Value'].lower() for tag in tags}
tag_dict = {k.lower(): v.lower() for k, v in tags_to_dict(tags)}
tag_dict = {k.lower(): v.lower() for k, v in tags_to_dict(tags).items()}
flags_dict = defaultdict(lambda: False)
flags = tag_dict.get(TAGKEY_FLAGS.lower(), '').split(',')
for flag in flags:
Expand Down Expand Up @@ -3102,7 +3102,7 @@ def process_tags_option_cname(tags):
"""

# tag_dict = {tag['Key'].lstrip().lower(): tag['Value'] for tag in tags}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags)}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags).items()}
# value = tag_dict.get(TAGKEY_CNAME.lower(), '').split(',')
# need additional work to handle a comma-separated list
value = tag_dict.get(TAGKEY_CNAME.lower(), '')
Expand All @@ -3118,7 +3118,7 @@ def process_tags_option_zone(tags):
"""

# tag_dict = {tag['Key'].lstrip().lower(): tag['Value'] for tag in tags}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags)}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags).items()}
value = tag_dict.get(TAGKEY_ZONE.lower(), '')
return process_tags_value(value)

Expand All @@ -3132,7 +3132,7 @@ def process_tags_option_name(tags):
"""

# tag_dict = {tag['Key'].lstrip().lower(): tag['Value'] for tag in tags}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags)}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags).items()}
value = tag_dict.get(TAGKEY_HOSTNAME.lower(), '')
return process_tags_value(value)

Expand All @@ -3152,7 +3152,7 @@ def process_tags_option_ptrname(tags):
"""

# tag_dict = {tag['Key'].lstrip().lower(): tag['Value'] for tag in tags}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags)}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags).items()}
value = tag_dict.get(TAGKEY_PTRNAME.lower(), '')
return process_tags_value(value)

Expand All @@ -3166,7 +3166,7 @@ def process_tags_name(tags):
"""

# tag_dict = {tag['Key'].lstrip().lower(): tag['Value'] for tag in tags}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags)}
tag_dict = {k.lower(): v for k, v in tags_to_dict(tags).items()}
value = tag_dict.get('name', '')
return process_tags_value(value)

Expand Down

0 comments on commit 0a614cd

Please sign in to comment.