1
0
Fork 0
mirror of https://github.com/erkin/ponysay.git synced 2025-04-05 02:39:39 +02:00

Avoid 'empty range for randrage()'

This commit is contained in:
Elis Axelsson 2012-08-18 17:05:26 +02:00
parent e4fb245e36
commit f16a89ffff

View file

@ -119,7 +119,7 @@ class ponysay():
if names == None:
names = list(ponies.keys())
return ponies[names[random.randrange(0, len(names) - 1)]]
return ponies[names[random.randrange(0, len(names))]]
'''
Returns a list with all (pony, quote file) pairs