1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Use if, else rather than try, except KeyError

This commit is contained in:
Ross McFarland
2019-10-14 07:48:47 -07:00
parent b8e2ec124b
commit 74048bf974

View File

@@ -564,9 +564,9 @@ def _mod_keyer(mod):
if rrset.get('GeoLocation', False):
unique_id = rrset['SetIdentifier']
else:
try:
if 'SetIdentifier' in rrset:
unique_id = '{}-{}'.format(rrset['Name'], rrset['SetIdentifier'])
except KeyError:
else:
unique_id = rrset['Name']
# Prioritise within the action_priority, ensuring targets come first.