aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElis Axelsson <elis.axelsson@gmail.com>2012-08-18 17:05:26 +0200
committerElis Axelsson <elis.axelsson@gmail.com>2012-08-18 17:05:26 +0200
commitf16a89ffffbc323262f6dc9f959ea9a3cf9dbc3d (patch)
tree0c3fcd69a49a7faf72d5e58ea85ba49844a3055d
parente4fb245e364a5d0e89d2fff988a10324356a0a58 (diff)
downloadponysay-f16a89ffffbc323262f6dc9f959ea9a3cf9dbc3d.tar.gz
ponysay-f16a89ffffbc323262f6dc9f959ea9a3cf9dbc3d.tar.bz2
ponysay-f16a89ffffbc323262f6dc9f959ea9a3cf9dbc3d.zip
Avoid 'empty range for randrage()'
-rwxr-xr-xponysay.py2
1 files changed, 1 insertions, 1 deletions
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