Skip to content

Commit

Permalink
fix: use right mode when opening toml file (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Anderson <[email protected]>
  • Loading branch information
AWS-Samuel authored Feb 8, 2024
1 parent 70b3eaf commit 7097cf3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion depsBundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ def _get_project_dict() -> dict[str, Any]:
subprocess.run(toml_install_pip_args, check=True)
sys.path.insert(0, toml_env)
import toml
mode = "r"
else:
import tomllib as toml

with open("pyproject.toml") as pyproject_toml:
mode = "rb"

with open("pyproject.toml", mode) as pyproject_toml:
return toml.load(pyproject_toml)


Expand Down

0 comments on commit 7097cf3

Please sign in to comment.