Skip to content
Snippets Groups Projects
Commit f96c42fe authored by Soumen Ghosh's avatar Soumen Ghosh
Browse files

lrdp_v2: linux_banner string value was not matching with regular expression

	 linux_banner string O/P was coming in different format,
	 so we have added proper regular expression to match it

Change-Id: Icd292b46132f2e9bd1d6d648626e48f729c68ad1
parent 18a3a52b
No related branches found
No related tags found
No related merge requests found
......@@ -300,12 +300,14 @@ class GdbMI(object):
raise GdbMIException(
cmd, '\n'.join(result.lines + result.oob_lines))
match = re.search(r'^[$]\d+ = \\"(.*)(\\\\n\\")', result.lines[0])
match_1 = re.search(r'^[$]\d+ = 0x[0-9a-fA-F]+ .* \\"(.*)(\\\\n\\")', result.lines[0])
match_2 = re.search(r'^[$]\d+ = 0x[0-9a-fA-F]+ \\"(.*)(\\\\n\\")', result.lines[0])
if match:
return match.group(1)
else:
match = re.search(r'^[$]\d+ = 0x[0-9a-fA-F]+ .* \\"(.*)(\\\\n\\")', result.lines[0])
if match:
return match.group(1)
return match.group(1).replace('\\\\n\\"',"")
elif match_1:
return match_1.group(1)
elif match_2:
return match_2.group(1).replace('\\\\n\\"', "")
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment