From e7436d7d79949d638c7cbdd46727302566f3b4d8 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 7 Nov 2013 21:22:38 +0100 Subject: [PATCH] Fix for python 3.3 --- tests/test_comics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_comics.py b/tests/test_comics.py index 95571f3c9..98c536c19 100644 --- a/tests/test_comics.py +++ b/tests/test_comics.py @@ -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.