From 1083a9e7eaf9e3fff8f46c47720b484c1620f8df Mon Sep 17 00:00:00 2001 From: GGabriele Date: Tue, 30 Aug 2016 14:22:26 +0200 Subject: [PATCH] Fixing conditional format --- network/nxos/nxos_bgp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/network/nxos/nxos_bgp.py b/network/nxos/nxos_bgp.py index 5cdf85d8e54..682cf9fcb3e 100644 --- a/network/nxos/nxos_bgp.py +++ b/network/nxos/nxos_bgp.py @@ -654,7 +654,10 @@ class CustomNetworkConfig(object): for item in self.items: for regexp in patterns: - string = item.text if ignore_whitespace is True else item.raw + if ignore_whitespace is True: + string = item.text + else: + string = item.raw if regexp.search(item.text): if item.text != replace: if parents == [p.text for p in item.parents]: