aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-07 00:16:52 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-07 00:16:52 +0100
commit20c1782f7865b5f96b1650a65097a0e2bdd1241e (patch)
tree188a29f7e1bfa05a0a08a8d6f015f00a03d8e71e /src/util.py
parentchase demo (diff)
downloadxpybar-20c1782f7865b5f96b1650a65097a0e2bdd1241e.tar.gz
xpybar-20c1782f7865b5f96b1650a65097a0e2bdd1241e.tar.bz2
xpybar-20c1782f7865b5f96b1650a65097a0e2bdd1241e.tar.xz
fix and demo cpuonline
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/util.py')
-rw-r--r--src/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.py b/src/util.py
index 9c8c9d5..d42515b 100644
--- a/src/util.py
+++ b/src/util.py
@@ -98,7 +98,7 @@ def reduce(f, items):
@return ¿E? The output
'''
if len(items) < 2:
- return items
+ return [] if len(items) == 0 else items[0]
rc = items[0]
for i in range(1, len(items)):
rc = f(rc, items[i])