mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-23 11:27:38 +08:00
better handling of put_immutable_data where there's a zone file hash collision
This commit is contained in:
@@ -247,8 +247,9 @@ def put_immutable_data_zonefile(user_zonefile, data_id, data_hash, data_url=None
|
||||
assert scripts.is_valid_hash(data_hash)
|
||||
|
||||
k = get_immutable_data_hashes(user_zonefile, data_id)
|
||||
if k is not None:
|
||||
if k is not None and len(k) > 0:
|
||||
# exists or name collision
|
||||
log.debug("collision on {} ({})".format(data_id, k))
|
||||
return k[0] == data_hash
|
||||
|
||||
txtrec = '#{}'.format(data_hash)
|
||||
|
||||
Reference in New Issue
Block a user