summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/puppet/type/file/checksum.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/type/file/checksum.rb b/lib/puppet/type/file/checksum.rb
index 82fae748c..7915c3888 100755
--- a/lib/puppet/type/file/checksum.rb
+++ b/lib/puppet/type/file/checksum.rb
@@ -69,6 +69,7 @@ Puppet::Type.type(:file).newproperty(:checksum) do
# Store the checksum in the data cache, or retrieve it if only the
# sum type is provided.
def cache(type, sum = nil)
+ return unless resource.catalog.host_config?
unless type
raise ArgumentError, "A type must be specified to cache a checksum"
end
@@ -261,6 +262,7 @@ Puppet::Type.type(:file).newproperty(:checksum) do
# Store the new sum to the state db.
def updatesum(newvalue)
+ return unless resource.catalog.host_config?
result = false
# if we're replacing, vs. updating