Use six.moves.urllib instead of urllib/urllib2/urlparse

In Python 3, these modules are reorganized.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Petr Viktorin
2015-09-14 12:52:29 +02:00
committed by Jan Cholasta
parent 7f1204a42c
commit 70b37a956c
18 changed files with 77 additions and 71 deletions

View File

@@ -21,10 +21,10 @@ import re
import time
import datetime
import email.utils
from urllib2 import urlparse
from calendar import timegm
import six
from six.moves.urllib.parse import urlparse
from ipapython.ipa_log_manager import log_mgr
@@ -540,7 +540,7 @@ class Cookie(object):
received from.
'''
scheme, domain, path, params, query, fragment = urlparse.urlparse(url)
scheme, domain, path, params, query, fragment = urlparse(url)
if self.domain is None:
self.domain = domain.lower()
@@ -642,7 +642,7 @@ class Cookie(object):
cookie_name = self.key
url_scheme, url_domain, url_path, url_params, url_query, url_fragment = urlparse.urlparse(url)
url_scheme, url_domain, url_path, url_params, url_query, url_fragment = urlparse(url)
cookie_expiration = self.get_expiration()
if cookie_expiration is not None: