Skip to content

Commit

Permalink
Close drag polar files after opening
Browse files Browse the repository at this point in the history
  • Loading branch information
Missing-Tech committed Mar 25, 2024
1 parent ee8252d commit d32058d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openap/drag.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def dragpolar(self):
raise RuntimeError(f"Drag polar for {self.ac} not avaiable in OpenAP.")

f = dir_dragpolar + ac + ".yml"
dragpolar = yaml.safe_load(open(f))
with open(f, "r") as file:
dragpolar = yaml.safe_load(file.read())
return dragpolar

@ndarrayconvert
Expand Down

0 comments on commit d32058d

Please sign in to comment.