[3/9] support/graph-size: don't report "Others" if size is zero
diff mbox series

Message ID e01ff079d40c53d0f84c699655de0dceef3f889b.1566062299.git.yann.morin.1998@free.fr
State Accepted
Headers show
Series
  • Untitled series #125748
Related show

Commit Message

Yann E. MORIN Aug. 17, 2019, 5:18 p.m. UTC
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
 support/scripts/size-stats | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch
diff mbox series

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,