From f16a89ffffbc323262f6dc9f959ea9a3cf9dbc3d Mon Sep 17 00:00:00 2001 From: Elis Axelsson Date: Sat, 18 Aug 2012 17:05:26 +0200 Subject: Avoid 'empty range for randrage()' --- ponysay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ponysay.py b/ponysay.py index 0728666..c6c83f8 100755 --- a/ponysay.py +++ b/ponysay.py @@ -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 -- cgit