diff --git a/tests/test_roledb.py b/tests/test_roledb.py index 1e53e918..e270ea60 100755 --- a/tests/test_roledb.py +++ b/tests/test_roledb.py @@ -57,7 +57,6 @@ def tearDown(self): def test_create_roledb(self): # Verify that a roledb is created for a named repository. - print('roledb: ' + repr(tuf.roledb._roledb_dict)) self.assertEqual(1, len(tuf.roledb._roledb_dict)) self.assertTrue('default' in tuf.roledb._roledb_dict) diff --git a/tests/test_updater.py b/tests/test_updater.py index 896ba300..cce18876 100755 --- a/tests/test_updater.py +++ b/tests/test_updater.py @@ -1075,8 +1075,6 @@ def test_6_download_target(self): # 'download_targetfileinfo' object being tested. if 'custom' in target_fileinfo['fileinfo']: download_targetfileinfo['custom'] = target_fileinfo['fileinfo']['custom'] - print('target_fileinfo: ' + repr(target_fileinfo['fileinfo'])) - print('\ndownload_targetfileinfo: ' + repr(download_targetfileinfo)) self.assertEqual(target_fileinfo['fileinfo'], download_targetfileinfo) diff --git a/tuf/sig.py b/tuf/sig.py index 1e3d9dd7..88f526a9 100755 --- a/tuf/sig.py +++ b/tuf/sig.py @@ -97,9 +97,11 @@ def get_signature_status(signable, role=None, repository_name='default'): # all dict keys are properly named. Raise 'tuf.FormatError' if the check # fails. tuf.formats.SIGNABLE_SCHEMA.check_match(signable) - tuf.formats.ROLENAME_SCHEMA.check_match(role) tuf.formats.NAME_SCHEMA.check_match(repository_name) + if role is not None: + tuf.formats.ROLENAME_SCHEMA.check_match(role) + # The signature status dictionary returned. signature_status = {}