mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
Fix incorrect error handling in ipapython/graph.py
fix: correction in exception type for remove_edge the previous code raises the KeyError but the list.remove() actually raises ValueError so the Actual problem was not getting resolved. Fixes:https://pagure.io/freeipa/issue/9876 signed-off-by: Sami Shaikh 1694samishaikh@gmail.com Reviewed-By: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
This commit is contained in:
1 parent
386e9f37af
commit
f094818347
1 file changed
+1
-1
+1
-1
@@ -34,7 +34,7 @@ class Graph:
|
||||
def remove_edge(self, tail, head):
|
||||
try:
|
||||
self.edges.remove((tail, head))
|
||||
except KeyError:
|
||||
except ValueError:
|
||||
raise ValueError(
|
||||
"graph does not contain edge: ({0}, {1})".format(tail, head)
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user