From 776d4e03571179009cf1df771b12f1fec9f0b1fe Mon Sep 17 00:00:00 2001 From: Aristarkh Zagorodnikov Date: Tue, 31 Aug 2021 12:31:01 +0300 Subject: [PATCH] Fix "undefined method `gsub' for nil:NilClass" when changing existing rule UID from absent to present --- lib/puppet/type/firewall.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index bd57ce9..d46316b 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -1366,6 +1366,8 @@ Puppet::Type.newtype(:firewall) do statement. PUPPETCODE def insync?(is) + return false unless is + require 'etc' # The following code allow us to take into consideration unix mappings @@ -1413,6 +1415,8 @@ Puppet::Type.newtype(:firewall) do statement. PUPPETCODE def insync?(is) + return false unless is + require 'etc' # The following code allow us to take into consideration unix mappings -- 2.45.2