Skip to content

Commit 9b70012

Browse files
committed
pexpect: Fix escape sequence warnings
Use raw strings to fix escape sequence warnings such as: lib/pexpect_utils.py:14: SyntaxWarning: invalid escape sequence '\(' '\( 700 \) Program Exception',
1 parent da23355 commit 9b70012

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/pexpect_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
class PexpectHelper:
99
default_bug_patterns = [
10-
'Unable to handle kernel paging request',
11-
'Oops: Kernel access of bad area',
12-
'Kernel panic - not syncing:',
13-
'------------\[ cut here \]------------',
14-
'\( 700 \) Program Exception',
10+
r'Unable to handle kernel paging request',
11+
r'Oops: Kernel access of bad area',
12+
r'Kernel panic - not syncing:',
13+
r'------------\[ cut here \]------------',
14+
r'\( 700 \) Program Exception',
1515
]
1616

1717
def __init__(self):
@@ -185,7 +185,7 @@ def xmon_di(p, addr):
185185
xmon_enter(p)
186186

187187
p.send("di %x 1" % addr)
188-
p.expect("di %x 1\s+%x\s+([a-f0-9]+)\s+([\.a-z].*)\r" % (addr, addr))
188+
p.expect("di %x 1\\s+%x\\s+([a-f0-9]+)\\s+([\\.a-z].*)\r" % (addr, addr))
189189
result = [s.strip() for s in p.matches()]
190190
p.expect_prompt()
191191

0 commit comments

Comments
 (0)