mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Cleaner impl for _plan_keyer
This commit is contained in:
@@ -67,10 +67,8 @@ class Manager(object):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _plan_keyer(cls, p):
|
def _plan_keyer(cls, p):
|
||||||
try:
|
plan = p[1]
|
||||||
return len(p[1].changes[0].record.zone.name)
|
return len(plan.changes[0].record.zone.name) if plan.changes else 0
|
||||||
except (AttributeError, IndexError):
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def __init__(self, config_file, max_workers=None, include_meta=False):
|
def __init__(self, config_file, max_workers=None, include_meta=False):
|
||||||
self.log.info('__init__: config_file=%s', config_file)
|
self.log.info('__init__: config_file=%s', config_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user