summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/graph.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-01-07 22:19:18 -0600
committerLuke Kanies <luke@madstop.com>2008-01-07 22:19:18 -0600
commitfe9b453650755e66e29eca259075e2e7245a5219 (patch)
tree419bc1c919e64d760baf79f46b7585c03904a1e4 /lib/puppet/util/graph.rb
parentb7b11bd4858a4d6dd0661aa7c546d03b4a85ca7d (diff)
parent40addcd1920b0fa2f558c415e65ea665bac812f9 (diff)
downloadpuppet-fe9b453650755e66e29eca259075e2e7245a5219.tar.gz
puppet-fe9b453650755e66e29eca259075e2e7245a5219.tar.xz
puppet-fe9b453650755e66e29eca259075e2e7245a5219.zip
Merge branch '0.24.x' into no_global_resources
Diffstat (limited to 'lib/puppet/util/graph.rb')
-rw-r--r--lib/puppet/util/graph.rb10
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