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>
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)