From 2095225a3c64a5b81b99c8f98ef17d7aa5568748 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 27 Jun 2023 16:01:50 +0200 Subject: [PATCH] TAM msgs: be more specific: archives vs. manifest --- src/borg/crypto/key.py | 8 ++++---- src/borg/testsuite/archiver.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/borg/crypto/key.py b/src/borg/crypto/key.py index 797e22725..65cbd99e8 100644 --- a/src/borg/crypto/key.py +++ b/src/borg/crypto/key.py @@ -255,7 +255,7 @@ class KeyBase: if tam_required: raise TAMRequiredError(self.repository._location.canonical_path()) else: - logger.debug('TAM not found and not required') + logger.debug('Manifest TAM not found and not required') return unpacked, False tam = unpacked.pop(b'tam', None) if not isinstance(tam, dict): @@ -265,7 +265,7 @@ class KeyBase: if tam_required: raise TAMUnsupportedSuiteError(repr(tam_type)) else: - logger.debug('Ignoring TAM made with unsupported suite, since TAM is not required: %r', tam_type) + logger.debug('Ignoring manifest TAM made with unsupported suite, since TAM is not required: %r', tam_type) return unpacked, False tam_hmac = tam.get(b'hmac') tam_salt = tam.get(b'salt') @@ -297,7 +297,7 @@ class KeyBase: archive_name = unpacked.get(b'name', b'').decode('ascii', 'replace') raise ArchiveTAMRequiredError(archive_name) else: - logger.debug('TAM not found and not required') + logger.debug('Archive TAM not found and not required') return unpacked, False tam = unpacked.pop(b'tam', None) if not isinstance(tam, dict): @@ -307,7 +307,7 @@ class KeyBase: if tam_required: raise TAMUnsupportedSuiteError(repr(tam_type)) else: - logger.debug('Ignoring TAM made with unsupported suite, since TAM is not required: %r', tam_type) + logger.debug('Ignoring archive TAM made with unsupported suite, since TAM is not required: %r', tam_type) return unpacked, False tam_hmac = tam.get(b'hmac') tam_salt = tam.get(b'salt') diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 5ec88476c..15947ead0 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -3555,7 +3555,7 @@ class ManifestAuthenticationTest(ArchiverTestCaseBase): repository.commit() output = self.cmd('list', '--debug', self.repository_location) assert 'archive1234' in output - assert 'TAM not found and not required' in output + assert 'Manifest TAM not found and not required' in output # Run upgrade self.cmd('upgrade', '--tam', self.repository_location) # Manifest must be authenticated now