aboutsummaryrefslogtreecommitdiffstats
path: root/examples/plugins/cpuonline
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-03-29 01:06:31 +0100
committerMattias Andrée <maandree@operamail.com>2015-03-29 01:06:31 +0100
commitf3f76e9b47492b60f9fc6e7735be332d36b97eaa (patch)
tree85bbc01a3c11b65790e839fa578c618336075191 /examples/plugins/cpuonline
parentadd get_event_mask and get_override_redirect (diff)
downloadxpybar-f3f76e9b47492b60f9fc6e7735be332d36b97eaa.tar.gz
xpybar-f3f76e9b47492b60f9fc6e7735be332d36b97eaa.tar.bz2
xpybar-f3f76e9b47492b60f9fc6e7735be332d36b97eaa.tar.xz
small fixes
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples/plugins/cpuonline')
-rw-r--r--examples/plugins/cpuonline2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/plugins/cpuonline b/examples/plugins/cpuonline
index 1f99478..8853204 100644
--- a/examples/plugins/cpuonline
+++ b/examples/plugins/cpuonline
@@ -13,7 +13,7 @@ OUTPUT, HEIGHT, YPOS, TOP = 0, 12, 24, True
def redraw():
cpu = CPUOnline()
- s = lambda cpus : ', '.join([str(i) for i in cpus])
+ s = lambda cpus : '(none)' if len(cpus) == 0 else ', '.join([str(i) for i in cpus])
text = 'Online: %s │ Offline: %s │ Present: %s │ Possible: %s'
text %= s(cpu.online), s(cpu.offline), s(cpu.present), s(cpu.possible)
bar.clear()