fix pep8 complaints

This commit is contained in:
William Faulk 2014-04-23 11:19:34 -04:00
parent 2329280da4
commit 15a922c901
1 changed files with 14 additions and 13 deletions

View File

@ -44,19 +44,11 @@ except ImportError:
# Begin import game to handle Python 2 and Python 3 # Begin import game to handle Python 2 and Python 3
try: try:
from urllib2 import urlopen, Request, HTTPError, URLError, HTTPErrorProcessor, build_opener from urllib2 import urlopen, Request, HTTPError, URLError, \
HTTPErrorProcessor, build_opener
except ImportError: except ImportError:
from urllib.request import urlopen, Request, HTTPError, URLError, HTTPErrorProcessor, build_opener from urllib.request import urlopen, Request, HTTPError, URLError, \
HTTPErrorProcessor, build_opener
class NoRedirection(HTTPErrorProcessor):
def http_response(self, request, response):
return response
https_response = http_response
try: try:
from Queue import Queue from Queue import Queue
@ -175,6 +167,15 @@ def distance(origin, destination):
return d return d
class NoRedirection(HTTPErrorProcessor):
"""httplib class to ignore redirections"""
def http_response(self, request, response):
return response
https_response = http_response
class FileGetter(threading.Thread): class FileGetter(threading.Thread):
"""Thread class for retrieving a URL""" """Thread class for retrieving a URL"""