Skip to content

Commit

Permalink
Don't shadow filehandle
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Oct 13, 2024
1 parent 018cfea commit 05ae927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/associated.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def _get_zip_scores_files(s):
with tempfile.NamedTemporaryFile() as f_zip:
shutil.copyfileobj(f_url, f_zip)
# Extract the scores file from the zip file
with zipfile.ZipFile(f_zip) as f_zip:
with f_zip.open(scores.path) as f_scores:
with zipfile.ZipFile(f_zip) as zf:
with zf.open(scores.path) as f_scores:
# Add scores in the file to our existing System
modelcif.reader.read(f_scores, add_to_system=s)

Expand Down

0 comments on commit 05ae927

Please sign in to comment.