summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/sftp.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-19 14:32:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-22 12:03:02 +0000
commit9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7 (patch)
tree2002648fd17558c7d895d672aa65fa46f4b82250 /bitbake/lib/bb/fetch2/sftp.py
parent4acc7322a2ada941b803e1aee23d84351888eef0 (diff)
downloadpoky-9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7.tar.gz
bitbake: fetch2: Stop passing around the pointless url parameter
There is no good reason to keep passing around the url parameter when its contained within urldata (ud). This is left around due to legacy reasons, some functions take it, some don't and its time to cleanup. This is fetcher internal API, there are a tiny number of external users of the internal API (buildhistory and distrodata) which can be fixed up after this change. (Bitbake rev: 6a48474de9505a3700863f31839a7c53c5e18a8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/sftp.py')
-rw-r--r--bitbake/lib/bb/fetch2/sftp.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/sftp.py b/bitbake/lib/bb/fetch2/sftp.py
index 5fbbcfdd90..8ea4ef2ff3 100644
--- a/bitbake/lib/bb/fetch2/sftp.py
+++ b/bitbake/lib/bb/fetch2/sftp.py
@@ -72,7 +72,7 @@ from bb.fetch2 import runfetchcmd
72class SFTP(FetchMethod): 72class SFTP(FetchMethod):
73 """Class to fetch urls via 'sftp'""" 73 """Class to fetch urls via 'sftp'"""
74 74
75 def supports(self, url, ud, d): 75 def supports(self, ud, d):
76 """ 76 """
77 Check to see if a given url can be fetched with sftp. 77 Check to see if a given url can be fetched with sftp.
78 """ 78 """
@@ -95,10 +95,10 @@ class SFTP(FetchMethod):
95 95
96 ud.localfile = data.expand(urllib.unquote(ud.basename), d) 96 ud.localfile = data.expand(urllib.unquote(ud.basename), d)
97 97
98 def download(self, uri, ud, d): 98 def download(self, ud, d):
99 """Fetch urls""" 99 """Fetch urls"""
100 100
101 urlo = URI(uri) 101 urlo = URI(ud.url)
102 basecmd = 'sftp -oPasswordAuthentication=no' 102 basecmd = 'sftp -oPasswordAuthentication=no'
103 port = '' 103 port = ''
104 if urlo.port: 104 if urlo.port:
@@ -124,6 +124,6 @@ class SFTP(FetchMethod):
124 cmd = '%s %s %s %s' % (basecmd, port, commands.mkarg(remote), 124 cmd = '%s %s %s %s' % (basecmd, port, commands.mkarg(remote),
125 commands.mkarg(lpath)) 125 commands.mkarg(lpath))
126 126
127 bb.fetch2.check_network_access(d, cmd, uri) 127 bb.fetch2.check_network_access(d, cmd, ud.url)
128 runfetchcmd(cmd, d) 128 runfetchcmd(cmd, d)
129 return True 129 return True