Skip to content

Commit

Permalink
fixup! install: validate checksums
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <[email protected]>
  • Loading branch information
FFY00 committed May 28, 2020
1 parent 99d3c7b commit 8ba2d07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions install/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ def _validate_checksums(dist_info, dir): # type: (str, str) -> None
with open(os.path.join(dist_info, 'RECORD'), 'r') as f:
lines = [line.strip() for line in f]

records = installer.records.parse_record_file(lines)
for record in records:
for record in installer.records.parse_record_file(lines):
with open(os.path.join(dir, record.path.as_posix()), 'rb') as f:
if not record.validate(f.read()):
raise InstallException('Invalid checksum: {}'.format(record))
Expand Down

0 comments on commit 8ba2d07

Please sign in to comment.