bloat-o-meter: touchup argv handling
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Matt Mackall <mpm@selenic.com>
This commit is contained in:
parent
5177e28e9c
commit
98f74034cd
@ -16,12 +16,12 @@ def usage():
|
|||||||
if len(sys.argv) < 3:
|
if len(sys.argv) < 3:
|
||||||
usage()
|
usage()
|
||||||
|
|
||||||
for f in sys.argv[1], sys.argv[2]:
|
for f in sys.argv[1:3]:
|
||||||
if not os.path.exists(f):
|
if not os.path.exists(f):
|
||||||
sys.stderr.write("Error: file '%s' does not exist\n" % f)
|
sys.stderr.write("Error: file '%s' does not exist\n" % f)
|
||||||
usage()
|
usage()
|
||||||
|
|
||||||
nm_args = " ".join([x for x in sys.argv[3:]])
|
nm_args = " ".join(sys.argv[3:])
|
||||||
def getsizes(file):
|
def getsizes(file):
|
||||||
sym = {}
|
sym = {}
|
||||||
for l in os.popen("nm --size-sort %s %s" % (nm_args, file)).readlines():
|
for l in os.popen("nm --size-sort %s %s" % (nm_args, file)).readlines():
|
||||||
|
Loading…
Reference in New Issue
Block a user