lib/puppet/resource_api/transport.rb in puppet-resource_api-1.8.0 vs lib/puppet/resource_api/transport.rb in puppet-resource_api-1.8.1
- old
+ new
@@ -82,10 +82,10 @@
def self.wrap_sensitive(name, connection_info)
transport_schema = @transports[@environment][name]
if transport_schema
transport_schema.definition[:connection_info].each do |attr_name, options|
- if options.key?(:sensitive) && (options[:sensitive] == true)
+ if options.key?(:sensitive) && (options[:sensitive] == true) && connection_info.key?(attr_name)
connection_info[attr_name] = Puppet::Pops::Types::PSensitiveType::Sensitive.new(connection_info[attr_name])
end
end
end
connection_info