support/scripts/size-stats: avoid divide-by-zero
authorAndrey Yurovsky <yurovsky@gmail.com>
Tue, 28 Nov 2017 03:37:07 +0000 (19:37 -0800)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 29 Nov 2017 20:36:34 +0000 (21:36 +0100)
commit88af7d330dec7b6386a9994d8e53900033d85903
treef812cfe2341bde79062e090084736304b72c16e0
parent86ad37b948b5dd1845ef7e0a3620a0e9c5820559
support/scripts/size-stats: avoid divide-by-zero

Some packages (ex: skeleton-init-systemd) have a zero size so we cannot
divide by the package size. In that case make their percent zero
explicitly and avoid a ZeroDivisionError exception.

Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/size-stats