don't calculate a zonefile hash unless we need to

This commit is contained in:
Jude Nelson
2018-01-29 19:09:51 -05:00
parent 07bec9dbbe
commit 2b3d05aca2

View File

@@ -204,9 +204,9 @@ def add_atlas_zonefile_data( zonefile_text, zonefile_dir ):
Return False on error
"""
zonefile_hash = get_zonefile_data_hash( zonefile_text )
rc = store_atlas_zonefile_data( zonefile_text, zonefile_dir )
if not rc:
zonefile_hash = get_zonefile_data_hash( zonefile_text )
log.error("Failed to save zonefile {}".format(zonefile_hash))
rc = False