mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
fix-up some spelling mistakes
Signed-off-by: chentanjun <2799194073@qq.com>
This commit is contained in:
parent
df1c749d56
commit
04019a1bd8
4 changed files with 6 additions and 6 deletions
|
|
@ -254,7 +254,7 @@ def test_snapshot_key_revocation(self):
|
|||
# because the timestamp key has changed; Snapshot, because Root has
|
||||
# changed, and Timesamp, because it must sign its metadata with a new key.
|
||||
repository.root.load_signing_key(self.role_keys['root']['private'])
|
||||
# Note: we added Timetamp's key to the Snapshot role.
|
||||
# Note: we added Timestamp's key to the Snapshot role.
|
||||
repository.snapshot.load_signing_key(self.role_keys['timestamp']['private'])
|
||||
repository.timestamp.load_signing_key(self.role_keys['timestamp']['private'])
|
||||
repository.writeall()
|
||||
|
|
@ -306,7 +306,7 @@ def test_targets_key_revocation(self):
|
|||
# because the timestamp key has changed; Snapshot, because Root has
|
||||
# changed, and Timestamp because it must sign its metadata with a new key.
|
||||
repository.root.load_signing_key(self.role_keys['root']['private'])
|
||||
# Note: we added Timetamp's key to the Targets role.
|
||||
# Note: we added Timestamp's key to the Targets role.
|
||||
repository.targets.load_signing_key(self.role_keys['timestamp']['private'])
|
||||
repository.snapshot.load_signing_key(self.role_keys['snapshot']['private'])
|
||||
repository.timestamp.load_signing_key(self.role_keys['timestamp']['private'])
|
||||
|
|
@ -362,7 +362,7 @@ def test_root_key_revocation(self):
|
|||
repository.root.load_signing_key(self.role_keys['targets']['private'])
|
||||
repository.root.load_signing_key(self.role_keys['timestamp']['private'])
|
||||
|
||||
# Note: We added the Snapshot, Targets, and Timetamp keys to the Root role.
|
||||
# Note: We added the Snapshot, Targets, and Timestampkeys to the Root role.
|
||||
# The Root's expected private key has not been loaded yet, so that we can
|
||||
# verify that refresh() correctly raises a
|
||||
# securesystemslib.exceptions.BadSignatureError exception.
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ def create_keydb_from_root_metadata(root_metadata, repository_name='default'):
|
|||
add_key(key_dict, keyid=None, repository_name=repository_name)
|
||||
|
||||
# Although keyid duplicates should *not* occur (unique dict keys), log a
|
||||
# warning and continue. Howerver, 'key_dict' may have already been
|
||||
# warning and continue. However, 'key_dict' may have already been
|
||||
# adding to the keydb elsewhere.
|
||||
except tuf.exceptions.KeyAlreadyExistsError as e: # pragma: no cover
|
||||
logger.warning(e)
|
||||
|
|
|
|||
|
|
@ -1997,7 +1997,7 @@ def create_tuf_client_directory(repository_directory, client_directory):
|
|||
|
||||
# If the client's metadata directory does not already exist, create it and
|
||||
# any of its parent directories, otherwise raise an exception. An exception
|
||||
# is raised to avoid accidentally overwritting previous metadata.
|
||||
# is raised to avoid accidentally overwriting previous metadata.
|
||||
try:
|
||||
os.makedirs(client_metadata_directory)
|
||||
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ def remove_verification_key(parsed_arguments):
|
|||
# It is assumed remove_verification_key() only raises
|
||||
# securesystemslib.exceptions.Error and
|
||||
# securesystemslib.exceptions.FormatError, and the latter is not raised
|
||||
# bacause a valid key should have been returned by
|
||||
# because a valid key should have been returned by
|
||||
# import_publickey_from_file().
|
||||
except securesystemslib.exceptions.Error:
|
||||
print(repr(keypath) + ' is not a trusted key. Skipping.')
|
||||
|
|
|
|||
Loading…
Reference in a new issue