verify_data: fix IntegrityError handling for defect chunks, fixes #2442

just getting data from the repo can already raise IntegrityErrors
in LoggedIO, so we need to catch them also.

see also the code a few lines above where this is done in the same way.
This commit is contained in:
Thomas Waldmann 2017-04-25 15:48:16 +02:00
parent 6f47b797f9
commit 28b0700437
1 changed files with 1 additions and 1 deletions

View File

@ -1254,8 +1254,8 @@ class ArchiveChecker:
# local repo (fs): as chunks.iteritems loop usually pumps a lot of data through,
# a defect chunk is likely not in the fs cache any more and really gets re-read
# from the underlying media.
encrypted_data = self.repository.get(defect_chunk)
try:
encrypted_data = self.repository.get(defect_chunk)
_chunk_id = None if defect_chunk == Manifest.MANIFEST_ID else defect_chunk
self.key.decrypt(_chunk_id, encrypted_data)
except IntegrityError: