diff options
author | Lavinia Foldenyi <lavinia.foldenyi@Lavinias-MacBook-Pro.local> | 2018-09-21 16:45:50 +0300 |
---|---|---|
committer | Lavinia Foldenyi <lavinia.foldenyi@Lavinias-MacBook-Pro.local> | 2018-09-25 16:20:15 +0300 |
commit | 3a91f8cf69dc6ba643f8d06f9d3aa61bd69d6b8a (patch) | |
tree | 6ccc2acfc63cdb913f3e1bede6d2c10d06036dc5 /lib | |
parent | 3241fbdbb117247490a6f662c32c21fb56af03ef (diff) | |
download | puppet-augeas_core-3a91f8cf69dc6ba643f8d06f9d3aa61bd69d6b8a.tar.gz puppet-augeas_core-3a91f8cf69dc6ba643f8d06f9d3aa61bd69d6b8a.tar.bz2 |
(MODULES-7814) Ignore nil values when parsing commands. Fix for: Could not evaluate: undefined method strip! for nil:NilClass
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/augeas/augeas.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb index a22a506..7704955 100644 --- a/lib/puppet/provider/augeas/augeas.rb +++ b/lib/puppet/provider/augeas/augeas.rb @@ -79,8 +79,9 @@ Puppet::Type.type(:augeas).provide(:augeas) do data = data.flatten args = [] data.each do |line| + next if line.nil? line.strip! - next if line.nil? || line.empty? + next if line.empty? argline = [] sc = StringScanner.new(line) cmd = sc.scan(%r{\w+|==|!=}) |