From cc45ad0b63508deeb06c54df4a7b87d94f756b78 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 4 Nov 2016 23:31:07 -0700 Subject: [PATCH] Simplify random Arnold quote choice --- plexpy/webserve.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 7cf29930..fa44bd91 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -4454,7 +4454,7 @@ class WebInterface(object): @addtoapi("arnold") def random_arnold_quotes(self, **kwargs): """ 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!', 'Your clothes, give them to me, now!', 'Do it!', @@ -4487,8 +4487,7 @@ class WebInterface(object): 'I just had a terrible thought... What if this is a dream?' ] - random_number = randint(0, len(quote_list) - 1) - return quote_list[int(random_number)] + return random.choice(quote_list) ### API ###