mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
more fixes + cleanup + support for --exclude argument
Ticket: CM-1438 Reviewed By: Testing Done:
This commit is contained in:
10
pkg/graph.py
10
pkg/graph.py
@ -1,4 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Copyright 2013. Cumulus Networks, Inc.
|
||||
# Author: Roopa Prabhu, roopa@cumulusnetworks.com
|
||||
#
|
||||
# graph --
|
||||
# graph helper module for ifupdown
|
||||
#
|
||||
|
||||
import logging
|
||||
from collections import deque
|
||||
@ -38,6 +45,7 @@ class graph():
|
||||
# If some indegrees are non zero, we have a cycle
|
||||
for ifname,indegree in indegrees.items():
|
||||
if indegree != 0:
|
||||
raise Exception('cycle found involving iface %s' %ifname)
|
||||
raise Exception('cycle found involving iface %s' %ifname +
|
||||
' (indegree %d)' %indegree)
|
||||
|
||||
return S
|
||||
|
Reference in New Issue
Block a user