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
This commit is contained in:
parent
9e2cd39d52
commit
3bc8fd0824
1 changed files with 2 additions and 0 deletions
|
@ -72,9 +72,11 @@ def map_info(map):
|
|||
f = open(map).read() # read map content
|
||||
|
||||
s = re.search('^PLUGIN_RAM *0x(\d|[abcdef])*', f, re.MULTILINE)
|
||||
if not s: return (name, 0)
|
||||
plugin_start = re.sub('^PLUGIN_RAM *0x0*', '', f[s.start():s.end()])
|
||||
|
||||
s = re.search('^\.pluginend *0x(\d|[abcdef])*', f, re.MULTILINE)
|
||||
if not s: return (name, 0)
|
||||
plugin_end = re.sub('^\.pluginend *0x0*', '', f[s.start():s.end()])
|
||||
|
||||
size = int(plugin_end, 16) - int(plugin_start, 16)
|
||||
|
|
Loading…
Reference in a new issue