Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
added one line
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat1433 committed May 26, 2019
1 parent ac4ff86 commit b31f288
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sage/graphs/base/c_graph.pyx
Expand Up @@ -2195,7 +2195,8 @@ cdef class CGraphBackend(GenericGraphBackend):
sage: G.distance(0, 5, by_weight=true)
3
"""

if exclude_vertices and (x in exclude_vertices or y in exclude_vertices):
raise LookupError("No path between %s and %s" % (x, y))
if x == y:
return 0

Expand Down

0 comments on commit b31f288

Please sign in to comment.