SpiffyTitles: Fixes variable usage before definition

This commit is contained in:
PrgmrBill 2015-05-04 20:51:19 -04:00
parent 02804ad678
commit 47982fb8ac
1 changed files with 3 additions and 1 deletions

View File

@ -39,6 +39,7 @@ class SpiffyTitles(callbacks.Plugin):
callBefore = ["Web"]
link_cache = []
handlers = {}
wall_clock_timeout = 8
def __init__(self, irc):
self.__parent = super(SpiffyTitles, self)
@ -394,6 +395,7 @@ class SpiffyTitles(callbacks.Plugin):
Typical IMDB URL: http://www.imdb.com/title/tt2467372/
"""
headers = self.get_headers()
result = None
# Don't care about query strings
if "?" in url:
@ -608,7 +610,7 @@ class SpiffyTitles(callbacks.Plugin):
return stripped_title
@timeout_decorator.timeout(8)
@timeout_decorator.timeout(wall_clock_timeout)
def get_source_by_url(self, url):
"""
Get the HTML of a website based on a URL