Simplify random Arnold quote choice

This commit is contained in:
JonnyWong16 2016-11-04 23:31:07 -07:00
parent 0ab9cdf97c
commit cc45ad0b63

View file

@ -4454,7 +4454,7 @@ class WebInterface(object):
@addtoapi("arnold") @addtoapi("arnold")
def random_arnold_quotes(self, **kwargs): def random_arnold_quotes(self, **kwargs):
""" Get to the chopper! """ """ Get to the chopper! """
from random import randint import random
quote_list = ['To crush your enemies, see them driven before you, and to hear the lamentation of their women!', quote_list = ['To crush your enemies, see them driven before you, and to hear the lamentation of their women!',
'Your clothes, give them to me, now!', 'Your clothes, give them to me, now!',
'Do it!', 'Do it!',
@ -4487,8 +4487,7 @@ class WebInterface(object):
'I just had a terrible thought... What if this is a dream?' 'I just had a terrible thought... What if this is a dream?'
] ]
random_number = randint(0, len(quote_list) - 1) return random.choice(quote_list)
return quote_list[int(random_number)]
### API ### ### API ###