summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-11-01 15:32:50 -0500
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commitf9254756348e76d557420e18d619dd68775437ae (patch)
tree298eda757eea00df86164ae0c8c8cc506d74733d
parent73f57f2bce4ea7951d765c4a695bae42a3e1100c (diff)
downloadpuppet-f9254756348e76d557420e18d619dd68775437ae.tar.gz
puppet-f9254756348e76d557420e18d619dd68775437ae.tar.xz
puppet-f9254756348e76d557420e18d619dd68775437ae.zip
Fixing file content logs
These were logging 'unknown checksum' unless the files had a source specified. Signed-off-by: Luke Kanies <luke@madstop.com>
-rwxr-xr-xlib/puppet/type/file/content.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb
index 032c7c839..0f26a8561 100755
--- a/lib/puppet/type/file/content.rb
+++ b/lib/puppet/type/file/content.rb
@@ -39,8 +39,8 @@ module Puppet
# Checksums need to invert how changes are printed.
def change_to_s(currentvalue, newvalue)
# Our "new" checksum value is provided by the source.
- unless source = resource.parameter(:source) and newvalue = source.checksum
- newvalue = "unknown checksum"
+ if source = resource.parameter(:source)
+ newvalue = source.checksum || "unknown checksum"
end
if currentvalue == :absent
return "defined content as '%s'" % [newvalue]