summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networkx/algorithms/shortest_paths/unweighted.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/networkx/algorithms/shortest_paths/unweighted.py b/networkx/algorithms/shortest_paths/unweighted.py
index 3610cced..0daf6de0 100644
--- a/networkx/algorithms/shortest_paths/unweighted.py
+++ b/networkx/algorithms/shortest_paths/unweighted.py
@@ -413,7 +413,7 @@ def single_target_shortest_path(G, target, cutoff=None):
shortest_path, single_source_shortest_path
"""
if target not in G:
- raise nx.NodeNotFound("Target {} not in G".format(source))
+ raise nx.NodeNotFound("Target {} not in G".format(target))
def join(p1, p2):
return p2 + p1