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 dc72536
Showing 1 changed file with 1 addition and 1 deletion.
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 dc72536

Please sign in to comment.