bb.fetch2: add urldata_init call for Fetch class
FetchData has some fetch method specific data, and only fetch method knows how to initialize it. originally it is mostly initialized in Fetch.localpath(). But now there is requirement to call Fetch.latest_revision() before Fetch.localpath(), thus require another earlier place for initialization. so urldata_init is introduced for this purpose. it will be called in FetchData:__init__ and make all the Fetch functions useable after that. Signed-off-by: Yu Ke <ke.yu@intel.com>
This commit is contained in:
parent
9e3a92c04a
commit
2892cbfb11
|
@ -546,6 +546,8 @@ class FetchData(object):
|
|||
for m in methods:
|
||||
if m.supports(url, self, d):
|
||||
self.method = m
|
||||
if hasattr(m,"urldata_init"):
|
||||
m.urldata_init(self, d)
|
||||
return
|
||||
raise NoMethodError("Missing implementation for url %s" % url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue