From 4863307299bee9a644a94957f06bed48d898532e Mon Sep 17 00:00:00 2001 From: "T.R. Fullhart" Date: Wed, 10 Sep 2014 13:44:39 -0700 Subject: [PATCH] Add support for rpc:// protocol schemes. Change-Id: I0e500e45cacc20ac04b43435c4bd189299e9e97b --- manifest_xml.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifest_xml.py b/manifest_xml.py index 3517c151..6d70c86b 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -86,16 +86,20 @@ class _XmlRemote(object): # about here are: # * no scheme in the base url, like # * persistent-https:// + # * rpc:// # We handle this by replacing these with obscure protocols # and then replacing them with the original when we are done. # gopher -> # wais -> persistent-https + # nntp -> rpc if manifestUrl.find(':') != manifestUrl.find('/') - 1: manifestUrl = 'gopher://' + manifestUrl manifestUrl = re.sub(r'^persistent-https://', 'wais://', manifestUrl) + manifestUrl = re.sub(r'^rpc://', 'nntp://', manifestUrl) url = urllib.parse.urljoin(manifestUrl, url) url = re.sub(r'^gopher://', '', url) url = re.sub(r'^wais://', 'persistent-https://', url) + url = re.sub(r'^nntp://', 'rpc://', url) return url def ToRemoteSpec(self, projectName):