summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2020-08-26 01:11:00 +0700
committerGitHub <noreply@github.com>2020-08-26 01:11:00 +0700
commit2822a43dfa151ab577cb4d9d22f33247784cac13 (patch)
treefbb40e37902209128b5b32b90a319e0d9edbac66
parentffb3e2dc9df93c53abbd7ff0742ea75090d8c33d (diff)
parentbfae3e1a439972cf17e0c8193a91e14e388367d8 (diff)
downloadvyos-1x-2822a43dfa151ab577cb4d9d22f33247784cac13.tar.gz
vyos-1x-2822a43dfa151ab577cb4d9d22f33247784cac13.zip
Merge pull request #533 from runborg/T2826
T2826: frr: frr python lib error in replace_section
-rw-r--r--python/vyos/frr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/frr.py b/python/vyos/frr.py
index e39b6a914..3fc75bbdf 100644
--- a/python/vyos/frr.py
+++ b/python/vyos/frr.py
@@ -281,7 +281,7 @@ def replace_section(config, replacement, from_re, to_re=r'!', before_re=r'line v
startline and endline tags will be automatically added to the resulting from_re/to_re and before_re regex'es
"""
- return _replace_section(config, replacement, replace_re=rf'^{from_re}$.*?^{to_re}$', before_re=rf'^{before_re}$')
+ return _replace_section(config, replacement, replace_re=rf'^{from_re}$.*?^{to_re}$', before_re=rf'^({before_re})$')
def remove_section(config, from_re, to_re='!'):