1
0
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:
roopa
2013-11-13 16:07:15 -08:00
parent eab25b7c62
commit 3e8ee54f30
15 changed files with 161 additions and 149 deletions

View File

@ -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