sysdata module: prevent a divide by zero on empty swap
@@ -330,6 +330,9 @@ class Py3status:
total_mem_kib = meminfo["SwapTotal:"]
used_mem_kib = total_mem_kib - meminfo["SwapFree:"]
+ if total_mem_kib == 0:
+ used_percent = 0
+ else:
used_percent = 100 * used_mem_kib / total_mem_kib
unit = "B" if unit == "dynamic" else unit
