diff options
-rw-r--r-- | lib/puppet/metatype/closure.rb | 3 | ||||
-rw-r--r-- | lib/puppet/type/resources.rb | 6 | ||||
-rwxr-xr-x | lib/puppet/type/user.rb | 4 | ||||
-rwxr-xr-x | test/types/resources.rb | 4 |
4 files changed, 10 insertions, 7 deletions
diff --git a/lib/puppet/metatype/closure.rb b/lib/puppet/metatype/closure.rb index 8892222d5..ebff33eeb 100644 --- a/lib/puppet/metatype/closure.rb +++ b/lib/puppet/metatype/closure.rb @@ -46,7 +46,8 @@ class Puppet::Type else @managed = false states.each { |state| - if state.should and ! state.class.unmanaged + s = state.should + if s and ! state.class.unmanaged @managed = true break end diff --git a/lib/puppet/type/resources.rb b/lib/puppet/type/resources.rb index 4796435bf..806858212 100644 --- a/lib/puppet/type/resources.rb +++ b/lib/puppet/type/resources.rb @@ -85,8 +85,8 @@ Puppet::Type.newtype(:resources) do end end - # Generate any new resources we need to manage. This is pretty hackish right now, - # because it only supports purging. + # Generate any new resources we need to manage. This is pretty hackish + # right now, because it only supports purging. def generate return [] unless self.purge? hascheck = false @@ -138,4 +138,4 @@ Puppet::Type.newtype(:resources) do end end -# $Id$
\ No newline at end of file +# $Id$ diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index 5aa7c4f4b..4fb1d02cd 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -228,7 +228,9 @@ module Puppet retrieve end - @should ||= [] + unless defined? @should and @should + return nil + end if @parent[:membership] == :inclusive return @should.sort.join(",") diff --git a/test/types/resources.rb b/test/types/resources.rb index 5da04e71c..03df5e4ab 100755 --- a/test/types/resources.rb +++ b/test/types/resources.rb @@ -182,7 +182,7 @@ class TestResources < Test::Unit::TestCase else # We'll reset the limit, since we can't really guarantee that # there are any users with uid > 500 - if ! high and entry.uid > 50 + if ! high and entry.uid > 100 high = entry.name break end @@ -214,4 +214,4 @@ class TestResources < Test::Unit::TestCase end end -# $Id$
\ No newline at end of file +# $Id$ |