summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-06-30 22:19:10 +0200
committerChristian Poessinger <christian@poessinger.com>2018-06-30 22:19:10 +0200
commita18d5f06a149e9852d89f751c1df512483e17763 (patch)
treea0114e8e996691c4108cf20406a20bd236f11872
parent7217b2f9eae89f22aef35717417f261d8a681447 (diff)
downloadvyos-1x-a18d5f06a149e9852d89f751c1df512483e17763.tar.gz
vyos-1x-a18d5f06a149e9852d89f751c1df512483e17763.zip
src: commands-pipe: fix bug (no raw string) reported by sonarcube
-rwxr-xr-xsrc/helpers/commands-pipe.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/helpers/commands-pipe.py b/src/helpers/commands-pipe.py
index 3ffc64545..1120bb09e 100755
--- a/src/helpers/commands-pipe.py
+++ b/src/helpers/commands-pipe.py
@@ -8,7 +8,6 @@ from vyos.configtree import ConfigTree
signal(SIGPIPE,SIG_DFL)
-
config_string = sys.stdin.read().strip()
if not config_string:
@@ -21,7 +20,7 @@ if not config_string:
# __root__ is hygienic enough.
config_string = "__root__ {{ {0} \n }}".format(config_string)
-config_re = re.compile("(set|comment)\s+__root__\s+(.*)")
+config_re = re.compile(r'(set|comment)\s+__root__\s+(.*)')
config = ConfigTree(config_string)
commands = config.to_commands()