diff options
author | Christian Poessinger <christian@poessinger.com> | 2018-06-30 22:19:10 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2018-06-30 22:19:10 +0200 |
commit | a18d5f06a149e9852d89f751c1df512483e17763 (patch) | |
tree | a0114e8e996691c4108cf20406a20bd236f11872 /src/helpers/commands-pipe.py | |
parent | 7217b2f9eae89f22aef35717417f261d8a681447 (diff) | |
download | vyos-1x-a18d5f06a149e9852d89f751c1df512483e17763.tar.gz vyos-1x-a18d5f06a149e9852d89f751c1df512483e17763.zip |
src: commands-pipe: fix bug (no raw string) reported by sonarcube
Diffstat (limited to 'src/helpers/commands-pipe.py')
-rwxr-xr-x | src/helpers/commands-pipe.py | 3 |
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() |