diff options
author | Luke Kanies <luke@madstop.com> | 2008-01-07 19:24:10 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-01-07 19:24:10 -0600 |
commit | 40addcd1920b0fa2f558c415e65ea665bac812f9 (patch) | |
tree | d2792c1d8c84d2cfaed6b48a4642d3ef29ba79c9 /lib/puppet/util | |
parent | 927dff41df8f1c236c54eaee9fa1db7a3efaf02a (diff) | |
download | puppet-40addcd1920b0fa2f558c415e65ea665bac812f9.tar.gz puppet-40addcd1920b0fa2f558c415e65ea665bac812f9.tar.xz puppet-40addcd1920b0fa2f558c415e65ea665bac812f9.zip |
Fixing #982 -- I have completely removed the GRATR graph library
from the system, and implemented my own topsort method.
Diffstat (limited to 'lib/puppet/util')
-rw-r--r-- | lib/puppet/util/graph.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/puppet/util/graph.rb b/lib/puppet/util/graph.rb index 028df5539..a9744578b 100644 --- a/lib/puppet/util/graph.rb +++ b/lib/puppet/util/graph.rb @@ -17,20 +17,14 @@ module Puppet::Util::Graph self.each do |child| unless block_given? and ! yield(child) graph.add_edge!(self, child) - - if graph.cyclic? - raise Puppet::Error, "%s created a cyclic graph" % self - end if child.respond_to?(:to_graph) child.to_graph(graph, &block) end end end - - if graph.cyclic? - raise Puppet::Error, "%s created a cyclic graph" % self - end + + # Do a topsort, which will throw an exception if the graph is cyclic. graph end |