From a18d5f06a149e9852d89f751c1df512483e17763 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 30 Jun 2018 22:19:10 +0200 Subject: src: commands-pipe: fix bug (no raw string) reported by sonarcube --- src/helpers/commands-pipe.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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() -- cgit v1.2.3