Skip to content

Commit

Permalink
[main] Carefully test if pyproject.toml contains a tool section (f…
Browse files Browse the repository at this point in the history
…ixes #227)
  • Loading branch information
anjos authored and gotcha committed May 26, 2021
1 parent 6f03ee5 commit 68f23f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
0.13.8 (unreleased)
-------------------

- Fix when `pyproject.toml` does not contain `tool` section.
[anjos]

- Add the convenience function ``iex()``.
[alanbernstein]

Expand Down
2 changes: 1 addition & 1 deletion ipdb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_config():
elif filepath.endswith('pyproject.toml'):
import toml
toml_file = toml.load(filepath)
if "ipdb" in toml_file["tool"]:
if "ipdb" in toml_file.get("tool"):
if not parser.has_section("ipdb"):
parser.add_section("ipdb")
for key, value in toml_file["tool"]["ipdb"].items():
Expand Down

0 comments on commit 68f23f2

Please sign in to comment.