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

fix up logging

This commit is contained in:
Joe Williams
2017-05-24 08:04:52 -07:00
parent 5b93bb5979
commit e16bd2701f

View File

@@ -35,18 +35,16 @@ class Plan(object):
change_counts[change.__class__.__name__] += 1
self.change_counts = change_counts
if self.existing:
self.log.debug('__init__: Creates=%s, Updates=%s, Deletes=%s'
'Existing=%s',
self.change_counts['Create'],
self.change_counts['Update'],
self.change_counts['Delete'],
len(self.existing.records))
else:
self.log.debug('__init__: Creates=%s, Updates=%s, Deletes=%s',
self.change_counts['Create'],
self.change_counts['Update'],
self.change_counts['Delete'])
try:
existing_n = len(self.existing.records)
except AttributeError:
existing_n = 0
self.log.debug('__init__: Creates=%d, Updates=%d, Deletes=%d'
'Existing=%d',
self.change_counts['Create'],
self.change_counts['Update'],
self.change_counts['Delete'], existing_n)
def raise_if_unsafe(self):
# TODO: what is safe really?