From 73f3b8ed04b7412e97aa28a8f6c8901f0604aa4e Mon Sep 17 00:00:00 2001 From: Alex Vidal Date: Tue, 22 Feb 2011 12:03:46 -0600 Subject: [PATCH] update comments --- plugins/metacritic.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/metacritic.py b/plugins/metacritic.py index 415d222..8f6df8d 100644 --- a/plugins/metacritic.py +++ b/plugins/metacritic.py @@ -1,4 +1,4 @@ -#Metacritic.com scraper +# metacritic.com scraper from util import hook, http @@ -11,6 +11,8 @@ def metacritic(inp): '.mc [all|movie|tv|album|x360|ps3|pc|ds|wii] -- gets rating for'\ ' <title> from metacritic on the specified medium' + # if the results suck, it's metacritic's fault + args = inp.strip() game_platforms = ('x360', 'ps3', 'pc', 'ds', 'wii', '3ds', 'gba') @@ -19,6 +21,9 @@ def metacritic(inp): try: plat, title = args.split(' ', 1) if plat not in all_platforms: + # raise the ValueError so that the except block catches it + # in this case, or in the case of the .split above raising the + # ValueError, we want the same thing to happen raise ValueError except ValueError: plat = 'all'