diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-19 04:40:25 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-19 04:40:25 +0000 |
commit | cef41c26eaec80aeaf1e28c2224bfa764df4519e (patch) | |
tree | f5f333e427b678332de58e36dd9ce16532af4fef /lib/puppet/pgraph.rb | |
parent | 177888365d70a5eafe47d8fdc16295dbb11ce297 (diff) | |
download | puppet-cef41c26eaec80aeaf1e28c2224bfa764df4519e.tar.gz puppet-cef41c26eaec80aeaf1e28c2224bfa764df4519e.tar.xz puppet-cef41c26eaec80aeaf1e28c2224bfa764df4519e.zip |
A slight fix for #507. This should at least provide better information if this problem crops up, although I cannot reproduce it.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2308 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/pgraph.rb')
-rw-r--r-- | lib/puppet/pgraph.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/puppet/pgraph.rb b/lib/puppet/pgraph.rb index 80a272cdf..ce6c1e411 100644 --- a/lib/puppet/pgraph.rb +++ b/lib/puppet/pgraph.rb @@ -57,9 +57,15 @@ class Puppet::PGraph < GRATR::Digraph bad << v unless sorted.include?(v) end - raise Puppet::Error, "Found dependency cycle involving %s" % bad.collect do |v| - v.to_s - end.join(", ") + if bad.length > 0 + raise Puppet::Error, + "Found dependency cycle involving %s" % bad.collect do |v| + v.to_s + end.join(", ") + else + raise Puppet::Error, + "Found dependency cycle but could not find the cause" + end end # Which resources a given resource depends upon. |