support/graph-size: don't report "Others" if size is zero
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 17 Aug 2019 17:18:24 +0000 (19:18 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Mon, 26 Aug 2019 20:08:18 +0000 (22:08 +0200)
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
support/scripts/size-stats

index bd10fbfb6822271af9970f16ef93e70443fbaf56..398c256e8be77a0e22b6ac6db776093284f6464a 100755 (executable)
@@ -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,