summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-20 19:41:38 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-20 19:41:38 +0000
commit299bdc1b23bbf39e436f5e67b598d60606ca6513 (patch)
tree26f5d2ae6807a6e2fae1f4aa8f58f56883042333 /lib/puppet/util
parente605c4aadd3a3c4cccbd01661c21a715ec3f0773 (diff)
downloadpuppet-299bdc1b23bbf39e436f5e67b598d60606ca6513.tar.gz
puppet-299bdc1b23bbf39e436f5e67b598d60606ca6513.tar.xz
puppet-299bdc1b23bbf39e436f5e67b598d60606ca6513.zip
Fixing #380. The problem was that a method was sometimes returning :absent when I expected it to return nil when the group was not found. All fixed, yay.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1960 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/util')
-rwxr-xr-xlib/puppet/util/posix.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/util/posix.rb b/lib/puppet/util/posix.rb
index 01c3e25aa..37ec298bb 100755
--- a/lib/puppet/util/posix.rb
+++ b/lib/puppet/util/posix.rb
@@ -43,7 +43,12 @@ module Puppet::Util::POSIX
if obj.provider
begin
- return obj.provider.send(field)
+ val = obj.provider.send(field)
+ if val == :absent
+ return nil
+ else
+ return val
+ end
rescue => detail
if Puppet[:trace]
puts detail.backtrace