summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-26 15:45:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-29 23:07:13 +0000
commit1dbcdfcdf8dd367b0b0440ba8ea7b79ac85a1a37 (patch)
tree48da669be7e7206c58649f8bdbfcf5b7b894a880
parenta0320f394423a20d3af08e1833f43ce94e2e1c7e (diff)
downloadpoky-1dbcdfcdf8dd367b0b0440ba8ea7b79ac85a1a37.tar.gz
oeqa/parselogs: Fix quoting
Fix deprecation warnings about invalid escape sequences. (From OE-Core rev: 43542614395150e8fa34133ba0fc7ee90f215bcb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/runtime/cases/parselogs.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py
index 50101b7851..b81acdd18a 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -303,7 +303,7 @@ class ParseLogsTest(OERuntimeTestCase):
303 grepcmd = 'grep ' 303 grepcmd = 'grep '
304 grepcmd += '-Ei "' 304 grepcmd += '-Ei "'
305 for error in errors: 305 for error in errors:
306 grepcmd += '\<' + error + '\>' + '|' 306 grepcmd += r'\<' + error + r'\>' + '|'
307 grepcmd = grepcmd[:-1] 307 grepcmd = grepcmd[:-1]
308 grepcmd += '" ' + str(log) + " | grep -Eiv \'" 308 grepcmd += '" ' + str(log) + " | grep -Eiv \'"
309 309
@@ -314,13 +314,13 @@ class ParseLogsTest(OERuntimeTestCase):
314 errorlist = ignore_errors['default'] 314 errorlist = ignore_errors['default']
315 315
316 for ignore_error in errorlist: 316 for ignore_error in errorlist:
317 ignore_error = ignore_error.replace('(', '\(') 317 ignore_error = ignore_error.replace('(', r'\(')
318 ignore_error = ignore_error.replace(')', '\)') 318 ignore_error = ignore_error.replace(')', r'\)')
319 ignore_error = ignore_error.replace("'", '.') 319 ignore_error = ignore_error.replace("'", '.')
320 ignore_error = ignore_error.replace('?', '\?') 320 ignore_error = ignore_error.replace('?', r'\?')
321 ignore_error = ignore_error.replace('[', '\[') 321 ignore_error = ignore_error.replace('[', r'\[')
322 ignore_error = ignore_error.replace(']', '\]') 322 ignore_error = ignore_error.replace(']', r'\]')
323 ignore_error = ignore_error.replace('*', '\*') 323 ignore_error = ignore_error.replace('*', r'\*')
324 ignore_error = ignore_error.replace('0-9', '[0-9]') 324 ignore_error = ignore_error.replace('0-9', '[0-9]')
325 grepcmd += ignore_error + '|' 325 grepcmd += ignore_error + '|'
326 grepcmd = grepcmd[:-1] 326 grepcmd = grepcmd[:-1]