bitbake: ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git
* taken from SFTP fetcher: http://patchwork.openembedded.org/patch/43027/ (Bitbake rev: 88e565855b52e905156d85c3f45b341cddfe2f55) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
e863851045
commit
9df0588ab4
|
@ -73,6 +73,11 @@ class SSH(FetchMethod):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def urldata_init(self, urldata, d):
|
def urldata_init(self, urldata, d):
|
||||||
|
if 'protocol' in urldata.parm and urldata.parm['protocol'] == 'git':
|
||||||
|
raise bb.fetch2.ParameterError(
|
||||||
|
"Invalid protocol - if you wish to fetch from a git " +
|
||||||
|
"repository using ssh, you need to use " +
|
||||||
|
"git:// prefix with protocol=ssh", urldata.url)
|
||||||
m = __pattern__.match(urldata.url)
|
m = __pattern__.match(urldata.url)
|
||||||
path = m.group('path')
|
path = m.group('path')
|
||||||
host = m.group('host')
|
host = m.group('host')
|
||||||
|
|
Loading…
Reference in New Issue