Skip to content

Commit 5dce6f6

Browse files
authored
Merge pull request #6357 from pypa/fix-6340
fix: UnboundLocalError on pipenv graph
2 parents 62f75c5 + 2037ed6 commit 5dce6f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pipenv/routines/graph.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ def do_graph(project, bare=False, json=False, json_tree=False, reverse=False):
1616
pipdeptree_path = Path(pipdeptree.__file__).parent
1717
try:
1818
python_path = project.python()
19-
except AttributeError:
19+
except (AttributeError, RuntimeError):
2020
err.print(
2121
"[bold][red]Warning: Unable to display currently-installed dependency graph information here. "
2222
"Please run within a Pipenv project.[/red][/bold]",
2323
)
2424
sys.exit(1)
25-
except RuntimeError:
26-
pass
2725

2826
# Only keep the json + json_tree incompatibility check
2927
if json and json_tree:

0 commit comments

Comments
 (0)