[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:31:38 UTC 2010


The following commit has been merged in the upstream branch:
commit 1705366184133ccbf6d77ac8937ce79760f97d00
Author: Luke Kanies <luke at reductivelabs.com>
Date:   Wed Jan 6 16:35:11 2010 -0800

    Always warning if autoloading a file fails
    
    This stops hiding some really difficult to track down
    problems.
    
    Signed-off-by: Luke Kanies <luke at reductivelabs.com>

diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index ceaabe4..7358618 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -89,14 +89,8 @@ class Puppet::Util::Autoload
             rescue SystemExit,NoMemoryError
                 raise
             rescue Exception => detail
-                # I have no idea what's going on here, but different versions
-                # of ruby are raising different errors on missing files.
-                unless detail.to_s =~ /^no such file/i
-                    warn "Could not autoload %s: %s" % [name, detail]
-                    if Puppet[:trace]
-                        puts detail.backtrace
-                    end
-                end
+                puts detail.backtrace if Puppet[:trace]
+                warn "Could not autoload #{name}: #{detail}"
                 return named_file_is_missing(name)
             end
         end
@@ -128,10 +122,8 @@ class Puppet::Util::Autoload
                 rescue SystemExit,NoMemoryError
                     raise
                 rescue Exception => detail
-                    if Puppet[:trace]
-                        puts detail.backtrace
-                    end
-                    warn "Could not autoload %s: %s" % [file.inspect, detail]
+                    puts detail.backtrace if Puppet[:trace]
+                    warn "Could not autoload #{file}: #{detail}"
                 end
             end
         end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list