From: Yann E. MORIN Date: Sat, 17 Aug 2019 17:18:24 +0000 (+0200) Subject: support/graph-size: don't report "Others" if size is zero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c68ee73924c6860dc1f01b84f1a12b88039b2f4d;p=buildroot.git support/graph-size: don't report "Others" if size is zero Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- diff --git a/support/scripts/size-stats b/support/scripts/size-stats index bd10fbfb68..398c256e8b 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -137,8 +137,9 @@ def draw_graph(pkgsize, outputf): else: labels.append("%s (%d kB)" % (p, sz / 1000.)) values.append(sz) - labels.append("Other (%d kB)" % (other_value / 1000.)) - values.append(other_value) + if other_value != 0: + labels.append("Other (%d kB)" % (other_value / 1000.)) + values.append(other_value) plt.figure() patches, texts, autotexts = plt.pie(values, labels=labels,