summaryrefslogtreecommitdiffstats
path: root/Reaktor/titlebot/commands/list
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-04-27 18:17:23 +0200
committermakefu <github@syntax-fehler.de>2014-04-27 18:17:23 +0200
commitaa4b1772353ddf520b210bb1a692ce1b604cba23 (patch)
tree416bf15d2c7a49542b53b805dd6a155e05735cf1 /Reaktor/titlebot/commands/list
parentadffcc9053665c52029cb96746ce28d9f334d18a (diff)
parent11a8e061d7b96df22c4793cbbd79cb8dba686513 (diff)
Merge branch 'master' of ssh://github.com/krebscode/painload
Diffstat (limited to 'Reaktor/titlebot/commands/list')
-rwxr-xr-xReaktor/titlebot/commands/list4
1 files changed, 2 insertions, 2 deletions
diff --git a/Reaktor/titlebot/commands/list b/Reaktor/titlebot/commands/list
index 3a29919a..cee4b8a8 100755
--- a/Reaktor/titlebot/commands/list
+++ b/Reaktor/titlebot/commands/list
@@ -17,11 +17,11 @@ if len(sys.argv) > 1 and ("-h" in sys.argv[1] or "usage" == sys.argv[1]):
if len(sys.argv) > 1 and ("votes" in sys.argv[1]):
use = poll.sort_by_votes(db)
elif len(sys.argv) > 1 and ("age" in sys.argv[1]) or len(sys.argv) == 1:
- pass
+ use = db
else:
print("unknown sorting method")
sys.exit(1)
-for entry in poll.sort_by_votes(db):
+for entry in use:
print("#%d %s (votes: %d)" %
(db.index(entry),entry['title'],sum(entry['votes'].values())))