This commit is contained in:
Kejian Wang 2016-11-02 17:27:45 -04:00 committed by Kwang100
parent c5d0970c0f
commit 202c74dc48

View file

@ -209,19 +209,6 @@ def should_write():
filename = write_metadata_file(signable, metadata_filename,
metadata['version'], compression_algorithms,
consistent_snapshot)
# The root and timestamp files should also be written without a version
# number prepended if 'consistent_snaptshot' is True. Clients may request
# a timestamp and root file without knowing their version numbers.
if rolename == 'root' or rolename == 'timestamp':
write_metadata_file(signable, metadata_filename, metadata['version'],
compression_algorithms, consistent_snapshot=False)
# The root role should always be accessible by version number, so that
# clients can walk through root history to update keys.
if rolename == 'root':
write_metadata_file(signable, metadata_filename, metadata['version'],
compression_algorithms, consistent_snapshot=True)
# 'signable' contains an invalid threshold of signatures.
else: