From 68621c991319bf683fbd83c9ad1c2dcb6b9b487e Mon Sep 17 00:00:00 2001
From: david22swan <david.swan@puppet.com>
Date: Thu, 21 Apr 2022 10:14:15 +0100
Subject: [PATCH] (maint) Rubocop exclusions added

---
 lib/puppet/provider/firewallchain/iptables_chain.rb | 2 +-
 lib/puppet/type/firewall.rb                         | 4 ++--
 lib/puppet/util/firewall.rb                         | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/puppet/provider/firewallchain/iptables_chain.rb b/lib/puppet/provider/firewallchain/iptables_chain.rb
index ec135d8..fb02753 100644
--- a/lib/puppet/provider/firewallchain/iptables_chain.rb
+++ b/lib/puppet/provider/firewallchain/iptables_chain.rb
@@ -143,7 +143,7 @@ Puppet::Type.type(:firewallchain).provide :iptables_chain do
     chains = []
 
     MAPPING.each do |p, c|
-      begin
+      begin # rubocop:disable Style/RedundantBegin
         c[:save].call.each_line do |line|
           if line =~ c[:re]
             name = Regexp.last_match(1) + ':' + ((table == 'filter') ? 'filter' : table) + ':' + p.to_s
diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb
index d2ece90..612dd15 100644
--- a/lib/puppet/type/firewall.rb
+++ b/lib/puppet/type/firewall.rb
@@ -315,7 +315,7 @@ Puppet::Type.newtype(:firewall) do
       end_addr = matches[2]
 
       [start_addr, end_addr].each do |addr|
-        begin
+        begin # rubocop:disable Style/RedundantBegin
           @resource.host_to_ip(addr)
         rescue StandardError
           raise("Invalid IP address \"#{addr}\" in range \"#{value}\"")
@@ -372,7 +372,7 @@ Puppet::Type.newtype(:firewall) do
       end_addr = matches[2]
 
       [start_addr, end_addr].each do |addr|
-        begin
+        begin # rubocop:disable Style/RedundantBegin
           @resource.host_to_ip(addr)
         rescue StandardError
           raise("Invalid IP address \"#{addr}\" in range \"#{value}\"")
diff --git a/lib/puppet/util/firewall.rb b/lib/puppet/util/firewall.rb
index ffa83f3..666347e 100644
--- a/lib/puppet/util/firewall.rb
+++ b/lib/puppet/util/firewall.rb
@@ -122,7 +122,7 @@ module Puppet::Util::Firewall
 
       new_value = nil
       Resolv.each_address(value) do |addr|
-        begin
+        begin # rubocop:disable Style/RedundantBegin
           new_value = Puppet::Util::IPCidr.new(addr, family)
           break
         rescue # looking for the one that works # rubocop:disable Lint/SuppressedException
-- 
2.45.2