mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Fix urllib.parse (urlparse) handling
Revert "Fix "'module' object is not callable" error", and fix it properly.
* The urlparse module is renamed to urllib.parse in Python 3.
* This commit fixes the code to use "urllib.parse.urlparse"
instead of creating a new module urlib and setting
urlib.parse to urlparse.urlparse.
* Fixes an AttributeError:
'function' object has no attribute 'uses_relative'
This reverts commit cd51f17c64
.
Change-Id: I48490b20ecd19cf5a6edd835506ea5a467d556ac
This commit is contained in:
parent
ef668c92c2
commit
db2ad9dfce
@ -27,7 +27,7 @@ else:
|
|||||||
import imp
|
import imp
|
||||||
import urlparse
|
import urlparse
|
||||||
urllib = imp.new_module('urllib')
|
urllib = imp.new_module('urllib')
|
||||||
urllib.parse = urlparse.urlparse
|
urllib.parse = urlparse
|
||||||
|
|
||||||
from git_config import GitConfig
|
from git_config import GitConfig
|
||||||
from git_refs import R_HEADS, HEAD
|
from git_refs import R_HEADS, HEAD
|
||||||
|
@ -34,7 +34,7 @@ else:
|
|||||||
import urlparse
|
import urlparse
|
||||||
import xmlrpclib
|
import xmlrpclib
|
||||||
urllib = imp.new_module('urllib')
|
urllib = imp.new_module('urllib')
|
||||||
urllib.parse = urlparse.urlparse
|
urllib.parse = urlparse
|
||||||
xmlrpc = imp.new_module('xmlrpc')
|
xmlrpc = imp.new_module('xmlrpc')
|
||||||
xmlrpc.client = xmlrpclib
|
xmlrpc.client = xmlrpclib
|
||||||
|
|
||||||
@ -509,7 +509,7 @@ later is required to fix a server side protocol bug.
|
|||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
parse_result = urllib.parse(manifest_server)
|
parse_result = urllib.parse.urlparse(manifest_server)
|
||||||
if parse_result.hostname:
|
if parse_result.hostname:
|
||||||
username, _account, password = \
|
username, _account, password = \
|
||||||
info.authenticators(parse_result.hostname)
|
info.authenticators(parse_result.hostname)
|
||||||
|
Loading…
Reference in New Issue
Block a user