Mark the string representing a regular expression as a raw string, so that the
entire escaping is performed by the regexp parser.

Signed-off-by: Michele Tartara <[email protected]>
---
 qa/qa_utils.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qa/qa_utils.py b/qa/qa_utils.py
index bcef97f..3bbd85e 100644
--- a/qa/qa_utils.py
+++ b/qa/qa_utils.py
@@ -625,8 +625,8 @@ def RemoveFromEtcHosts(hostnames):
 
   sed_data = " ".join(hostnames)
   try:
-    AssertCommand(("sed -e '/^\(::1\|127\.0\.0\.1\)\s\+%s/d' %s > %s"
-                   " && mv %s %s") %
+    AssertCommand((r"sed -e '/^\(::1\|127\.0\.0\.1\)\s\+%s/d' %s > %s"
+                   r" && mv %s %s") %
                    (sed_data, utils.ShellQuote(pathutils.ETC_HOSTS),
                     quoted_tmp_hosts, quoted_tmp_hosts,
                     utils.ShellQuote(pathutils.ETC_HOSTS)))
-- 
1.7.10.4

Reply via email to