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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user