diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-02-19 08:42:00 +1100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-02-19 08:42:00 +1100 |
commit | 8754f41117540b9bb79f4561c99cd608c0115117 (patch) | |
tree | deeec4c166eba9d592c6176f0983adb29efb0964 /lib | |
parent | f087df0644c2532cbdf2d0e9ee20fae0a19dc6e6 (diff) | |
parent | d11cd39024e1baa5988e587e34fad65bb116ea01 (diff) | |
download | puppet-8754f41117540b9bb79f4561c99cd608c0115117.tar.gz puppet-8754f41117540b9bb79f4561c99cd608c0115117.tar.xz puppet-8754f41117540b9bb79f4561c99cd608c0115117.zip |
Merge branch '0.24.x' of git://reductivelabs.com/puppet into 0.24.x
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/nameservice/directoryservice.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/provider/nameservice/directoryservice.rb b/lib/puppet/provider/nameservice/directoryservice.rb index 973a62f6e..e2e68b2ca 100644 --- a/lib/puppet/provider/nameservice/directoryservice.rb +++ b/lib/puppet/provider/nameservice/directoryservice.rb @@ -139,10 +139,12 @@ class DirectoryService < Puppet::Provider::NameService dscl_output.split("\n").each do |line| # JJM: Split the attribute name and the list of values. ds_attribute, ds_values_string = line.split(':') + + # Split sets the values to nil if there's nothing after the : + ds_values_string ||= "" # JJM: skip this attribute line if the Puppet::Type doesn't care about it. - next unless (@@ds_to_ns_attribute_map.keys.include?(ds_attribute) \ - and type_properties.include? @@ds_to_ns_attribute_map[ds_attribute]) + next unless (@@ds_to_ns_attribute_map.keys.include?(ds_attribute) and type_properties.include? @@ds_to_ns_attribute_map[ds_attribute]) # JJM: We asked dscl to output url encoded values so we're able # to machine parse on whitespace. We need to urldecode: |