summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-08-01 15:09:51 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-08-01 15:09:51 +0000
commit3bc8fd0824fcdea8efb5e7c01cf20e6c0ff73f87 (patch)
treeb2550895d575a523f36e4794af3d94a756047955 /utils
parent9e2cd39d52c57783ab1bae10daa0ff79f8335e6a (diff)
downloadrockbox-3bc8fd0824fcdea8efb5e7c01cf20e6c0ff73f87.tar.gz
rockbox-3bc8fd0824fcdea8efb5e7c01cf20e6c0ff73f87.tar.bz2
rockbox-3bc8fd0824fcdea8efb5e7c01cf20e6c0ff73f87.zip
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
Diffstat (limited to 'utils')
-rwxr-xr-xutils/analysis/cmp-plugins-size.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/analysis/cmp-plugins-size.py b/utils/analysis/cmp-plugins-size.py
index 27ffb0fcae..05c97486aa 100755
--- a/utils/analysis/cmp-plugins-size.py
+++ b/utils/analysis/cmp-plugins-size.py
@@ -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)