summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/type/file/content.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb
index f30833bd0..d571e469b 100755
--- a/lib/puppet/type/file/content.rb
+++ b/lib/puppet/type/file/content.rb
@@ -38,18 +38,17 @@ module Puppet
def checksum_type
if source = resource.parameter(:source)
- source.checksum =~ /^\{(\w+)\}.+/
- return $1.to_sym
+ result = source.checksum
elsif checksum = resource.parameter(:checksum)
result = checksum.checktype
- if result =~ /^\{(\w+)\}.+/
- return $1.to_sym
- else
- return result
- end
else
return :md5
end
+ if result =~ /^\{(\w+)\}.+/
+ return $1.to_sym
+ else
+ return result
+ end
end
# If content was specified, return that; else try to return the source content;