diff options
Diffstat (limited to 'lib/puppet/util.rb')
-rw-r--r-- | lib/puppet/util.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb index 0141d1c3c..d8b8c812f 100644 --- a/lib/puppet/util.rb +++ b/lib/puppet/util.rb @@ -155,6 +155,11 @@ module Util return nil end + # One of the unit tests was passing a Passwd struct + unless user.is_a?(String) or user.is_a?(Integer) + raise Puppet::DevError, "Invalid value for uid: %s" % user.class + end + if user =~ /^\d+$/ user = Integer(user) end |