python 3 urllib
This commit is contained in:
parent
0dbb926dec
commit
dcf1e09bbe
@ -1,5 +1,8 @@
|
||||
from datetime import datetime
|
||||
import urlparse
|
||||
try:
|
||||
from urlparse import urlparse
|
||||
except ImportError:
|
||||
from urllib.parse import urlparse
|
||||
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
@ -81,7 +84,7 @@ class ResultIter(object):
|
||||
|
||||
def safe_url(url):
|
||||
""" Remove password from printed connection URLs. """
|
||||
parsed = urlparse.urlparse(url)
|
||||
parsed = urlparse(url)
|
||||
if parsed.password is not None:
|
||||
pwd = ':%s@' % parsed.password
|
||||
url = url.replace(pwd, ':*****@')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user