Fix for python 3.3

This commit is contained in:
Bastian Kleineidam 2013-11-07 21:22:38 +01:00
parent ca17332942
commit e7436d7d79

View file

@ -6,7 +6,10 @@ import shutil
import re
import os
import multiprocessing
import urlparse
try:
from urllib.parse import urlsplit
except ImportError:
from urlparse import urlsplit
from itertools import islice
from unittest import TestCase
from dosagelib import scraper
@ -14,7 +17,7 @@ from dosagelib import scraper
def get_host(url):
"""Get host part of URL."""
return urlparse.urlsplit(url)[1].lower()
return urlsplit(url)[1].lower()
# Dictionary with per-host locks.