fix selection of pony without any listed

Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
Mattias Andrée 2013-04-03 20:30:07 +02:00
parent 49aa843415
commit 9e1eaddd69

View file

@ -540,7 +540,7 @@ class Ponysay():
printerr('All the ponies are missing, call the Princess!')
exit(249)
pony = names[random.randrange(0, len(names))]
selection = (pony, ponies[pony], quote)
selection = [(pony, [ponies[pony]], quote)]
## Select a random pony of the choosen ones
pony = selection[random.randrange(0, len(selection))]