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 | da5b4578c07838d7c8c5c1c923ea03895e19a0da (patch) | |
| tree | ca965893ec0b04ff510b2a5112cc57e59f6f4ab9 /Reaktor/titlebot/commands/list | |
| parent | 2d646912b01c3e9399c19347b524ebbe00f44a04 (diff) | |
add highest for titlebot
Diffstat (limited to 'Reaktor/titlebot/commands/list')
| -rwxr-xr-x | Reaktor/titlebot/commands/list | 4 | 
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()))) | 
