diff options
author | makefu <root@pigstarter.de> | 2014-04-25 16:34:34 +0200 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2014-04-25 16:34:34 +0200 |
commit | c35e62e336afdcfc0123ff29ec99266a29a6e812 (patch) | |
tree | eef1f236d98188d46bb63c7941d4af8e8566aa5f /titlebot/commands/list | |
parent | 8284fc3b99e4647098e5a97c237dd77dcd68fb65 (diff) |
add highest for titlebot
Diffstat (limited to 'titlebot/commands/list')
-rwxr-xr-x | titlebot/commands/list | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/titlebot/commands/list b/titlebot/commands/list index 3a29919..cee4b8a 100755 --- a/titlebot/commands/list +++ b/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()))) |