Skip to content

Commit

Permalink
Update aiida_mlip/calculations/base.py
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Wilkins <[email protected]>
  • Loading branch information
federicazanca and oerc0122 authored Jul 18, 2024
1 parent de9800d commit 8a6a004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiida_mlip/calculations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ def _add_model_to_cmdline(
if self.inputs.model is None:
raise ValueError("Model cannot be None")

with self.inputs.model.open(mode="rb") as source:
with folder.open("mlff.model", mode="wb") as target:
with (self.inputs.model.open(mode="rb") as source,
folder.open("mlff.model", mode="wb") as target):
shutil.copyfileobj(source, target)

model_path = "mlff.model"
Expand Down

0 comments on commit 8a6a004

Please sign in to comment.