Skip to content
Snippets Groups Projects
Commit 9ad7f414 authored by Sarangdhar Joshi's avatar Sarangdhar Joshi
Browse files

lrdpv2: Fix list vs tuple comparison

The ram_dump.kernel_version variable is defined as a list and
incorrectly compared with tuple. This comparison always fails.
Fix it by changing ram_dump.kernel_version variable to tuple.

Change-Id: I12d4556693101fccfad795e5ea737b42e96acac7
parent c1f67ce5
No related branches found
No related tags found
No related merge requests found
...@@ -472,7 +472,7 @@ class RamDump(): ...@@ -472,7 +472,7 @@ class RamDump():
self.ipc_log_debug = options.ipc_debug self.ipc_log_debug = options.ipc_debug
self.ipc_log_help = options.ipc_help self.ipc_log_help = options.ipc_help
self.use_stdout = options.stdout self.use_stdout = options.stdout
self.kernel_version = [0, 0, 0] self.kernel_version = (0, 0, 0)
if options.ram_addr is not None: if options.ram_addr is not None:
# TODO sanity check to make sure the memory regions don't overlap # TODO sanity check to make sure the memory regions don't overlap
for file_path, start, end in options.ram_addr: for file_path, start, end in options.ram_addr:
...@@ -640,7 +640,7 @@ class RamDump(): ...@@ -640,7 +640,7 @@ class RamDump():
self.version = v.group(1) self.version = v.group(1)
match = re.search('(\d+)\.(\d+)\.(\d+)', self.version) match = re.search('(\d+)\.(\d+)\.(\d+)', self.version)
if match is not None: if match is not None:
self.kernel_version = map(int, match.groups()) self.kernel_version = tuple(map(int, match.groups()))
else: else:
print_out_str('!!! Could not extract version info! {0}'.format(self.version)) print_out_str('!!! Could not extract version info! {0}'.format(self.version))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment