forked from OERV-BSP/u-boot
test/py: Use raw strings more to avoid deprecation warnings
We have two further uses of raw string usage in the test/py codebase that are used under CI. The first of which is under the bind test and is a direct update. The second of which is to strip VT100 codes from the match buffer. While switching this to a raw string is also a direct update, the comment it notes that problems were encountered on Ubuntu 14.04 (and whatever Python 2 version that was) that required slight tweaks to the regex. Replace that now that we're saying Python 3.5 is the minimum. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -9,11 +9,11 @@ def in_tree(response, name, uclass, drv, depth, last_child):
|
||||
lines = [x.strip() for x in response.splitlines()]
|
||||
leaf = ' ' * 4 * depth;
|
||||
if not last_child:
|
||||
leaf = leaf + '\|'
|
||||
leaf = leaf + r'\|'
|
||||
else:
|
||||
leaf = leaf + '`'
|
||||
leaf = leaf + '-- ' + name
|
||||
line = (' *{:10.10} [0-9]* \[ [ +] \] {:20.20} {}$'
|
||||
line = (r' *{:10.10} [0-9]* \[ [ +] \] {:20.20} {}$'
|
||||
.format(uclass, drv, leaf))
|
||||
prog = re.compile(line)
|
||||
for l in lines:
|
||||
|
||||
Reference in New Issue
Block a user