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

Jesse Wolfe jes5199 at gmail.com
Wed Jul 14 10:35:27 UTC 2010


The following commit has been merged in the upstream branch:
commit 5f53bfa282285a09f79d3cd02b7f5d6239825eda
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Fri Jun 25 17:59:04 2010 -0700

    Restore error handling for value=

diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index 2aeec82..4b626df 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -433,7 +433,16 @@ class Type
         end
 
         property = self.newattr(name)
-        property.value = value
+
+        begin
+            # make sure the parameter doesn't have any errors
+            property.value = value
+        rescue => detail
+            error = Puppet::Error.new("Parameter %s failed: %s" %
+                [name, detail])
+            error.set_backtrace(detail.backtrace)
+            raise error
+        end
 
         nil
     end
@@ -496,15 +505,7 @@ class Type
             return @parameters[name]
         end
 
-        begin
-            # make sure the parameter doesn't have any errors
-            return @parameters[name] = klass.new(:resource => self)
-        rescue => detail
-            error = Puppet::Error.new("Parameter %s failed: %s" %
-                [name, detail])
-            error.set_backtrace(detail.backtrace)
-            raise error
-        end
+        return @parameters[name] = klass.new(:resource => self)
     end
 
     # return the value of a parameter

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list