Skip to content

Commit 3bc8fd0

Browse files
committed
cmp-plugins-size: continue if a map file is absent/corrupted
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27654 a1c6a512-1295-4272-9138-f99709370657
1 parent 9e2cd39 commit 3bc8fd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/analysis/cmp-plugins-size.py

+2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ def map_info(map):
7272
f = open(map).read() # read map content
7373

7474
s = re.search('^PLUGIN_RAM *0x(\d|[abcdef])*', f, re.MULTILINE)
75+
if not s: return (name, 0)
7576
plugin_start = re.sub('^PLUGIN_RAM *0x0*', '', f[s.start():s.end()])
7677

7778
s = re.search('^\.pluginend *0x(\d|[abcdef])*', f, re.MULTILINE)
79+
if not s: return (name, 0)
7880
plugin_end = re.sub('^\.pluginend *0x0*', '', f[s.start():s.end()])
7981

8082
size = int(plugin_end, 16) - int(plugin_start, 16)

0 commit comments

Comments
 (0)