From 086c1c5ca52b0ed8b810ad5a293a574ba990e635 Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Tue, 13 Oct 2020 20:14:35 +0200
Subject: [PATCH] [cleaner] more streamlined sanitize_item method
Remove a duplicate call in both IF branches.
Resolves: #2272
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
---
sos/cleaner/mappings/ip_map.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sos/cleaner/mappings/ip_map.py b/sos/cleaner/mappings/ip_map.py
index 45fd9739..e6dffd60 100644
--- a/sos/cleaner/mappings/ip_map.py
+++ b/sos/cleaner/mappings/ip_map.py
@@ -121,13 +121,12 @@ class SoSIPMap(SoSMap):
# network and if it has, replace the default /32 netmask that
# ipaddress applies to no CIDR-notated addresses
self.set_ip_cidr_from_existing_subnet(addr)
- return self.sanitize_ipaddr(addr)
else:
# we have a CIDR notation, so generate an obfuscated network
# address and then generate an IP address within that network's
# range
self.sanitize_network(network)
- return self.sanitize_ipaddr(addr)
+ return self.sanitize_ipaddr(addr)
def sanitize_network(self, network):
"""Obfuscate the network address provided, and if there are host bits
--
2.26.2