From 40addcd1920b0fa2f558c415e65ea665bac812f9 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Mon, 7 Jan 2008 19:24:10 -0600 Subject: Fixing #982 -- I have completely removed the GRATR graph library from the system, and implemented my own topsort method. --- lib/puppet/util/graph.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lib/puppet/util') 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 -- cgit