Fix piecemap downlad error when invalid piecemap got downloaded
This commit is contained in:
parent
14cbaf47c8
commit
6776dabdb3
1 changed files with 2 additions and 2 deletions
|
@ -391,8 +391,8 @@ class ContentManagerPlugin(object):
|
|||
def verifyPiece(self, inner_path, pos, piece):
|
||||
try:
|
||||
piecemap = self.getPiecemap(inner_path)
|
||||
except OSError as err:
|
||||
raise VerifyError("Unable to download piecemap: %s" % err)
|
||||
except Exception as err:
|
||||
raise VerifyError("Unable to download piecemap: %s" % Debug.formatException(err))
|
||||
|
||||
piece_i = int(pos / piecemap["piece_size"])
|
||||
if CryptHash.sha512sum(piece, format="digest") != piecemap["sha512_pieces"][piece_i]:
|
||||
|
|
Loading…
Reference in a new issue