From 8fe9ef740a97be09953e24af6afe76c7a1126d94 Mon Sep 17 00:00:00 2001 From: Marina Moore Date: Thu, 23 Jul 2020 09:44:08 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Joshua Lock --- tuf/client/updater.py | 2 +- tuf/keydb.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tuf/client/updater.py b/tuf/client/updater.py index 20e95f64d5..a3045b7869 100755 --- a/tuf/client/updater.py +++ b/tuf/client/updater.py @@ -954,7 +954,7 @@ def _import_delegations(self, parent_role): key, _ = securesystemslib.keys.format_metadata_to_key(keyinfo, keyid) key['keyid'] = keyid - tuf.keydb.add_key(key, keyid=None, repository_name=self.repository_name) + tuf.keydb.add_key(key, repository_name=self.repository_name) except tuf.exceptions.KeyAlreadyExistsError: pass diff --git a/tuf/keydb.py b/tuf/keydb.py index b3fb3eb40d..26b403e014 100755 --- a/tuf/keydb.py +++ b/tuf/keydb.py @@ -128,7 +128,7 @@ def create_keydb_from_root_metadata(root_metadata, repository_name='default'): # keyids, otherwise add_key() will have no reference to it. try: key_dict['keyid'] = keyid - add_key(key_dict, keyid=None, repository_name=repository_name) + add_key(key_dict, repository_name=repository_name) # Although keyid duplicates should *not* occur (unique dict keys), log a # warning and continue. However, 'key_dict' may have already been