make import urlparse module consistent,httplib update to py3
This commit is contained in:
parent
a9aa622359
commit
623f3eb9da
|
@ -15,14 +15,7 @@ from test_framework.util import (
|
|||
)
|
||||
import base64
|
||||
import os
|
||||
|
||||
try:
|
||||
import http.client as httplib
|
||||
except ImportError:
|
||||
import httplib
|
||||
try:
|
||||
import urllib.parse as urlparse
|
||||
except ImportError:
|
||||
import urlparse
|
||||
|
||||
class HTTPBasicsTest (BitcoinTestFramework):
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
|
||||
import http.client as httplib
|
||||
import httplib
|
||||
import base64
|
||||
import decimal
|
||||
import json
|
||||
import logging
|
||||
import urllib.parse
|
||||
import urlparse
|
||||
|
||||
USER_AGENT = "AuthServiceProxy/0.1"
|
||||
|
||||
|
@ -63,7 +63,7 @@ class AuthServiceProxy():
|
|||
def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connection=None):
|
||||
self.__service_url = service_url
|
||||
self.__service_name = service_name
|
||||
self.__url = urllib.parse.urlparse(service_url)
|
||||
self.__url = urlparse.urlparse(service_url)
|
||||
if self.__url.port is None:
|
||||
port = 80
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue