Skip to content

Commit

Permalink
Replace afile with used throughout the code in such cases f
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic committed Jun 30, 2023
1 parent d504762 commit b4e68cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neuroscout/populate/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def hash_stim(stim, blocksize=65536):
filename = stim.history.source_file \
if stim.history \
else stim.filename
with open(filename, 'rb') as afile:
buf = afile.read(blocksize)
with open(filename, 'rb') as f:
buf = f.read(blocksize)
while len(buf) > 0:
hasher.update(buf)
buf = afile.read(blocksize)
buf = f.read(blocksize)

return hasher.hexdigest()

Expand Down

0 comments on commit b4e68cc

Please sign in to comment.