base bbclass: prepare for bitbake fetcher v2 integration

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Koen Kooi
2011-01-25 13:46:33 +01:00
parent b8a38dff25
commit 0427237aea

View File

@@ -135,7 +135,10 @@ python base_do_fetch() {
raise bb.build.FuncFailed("Malformed URL: %s" % value)
try:
bb.fetch.go(localdata)
if bb.fetch.__version__ == "1":
bb.fetch.go(localdata)
else:
bb.fetch.download(localdata)
except bb.fetch.MissingParameterError:
(type, value, traceback) = sys.exc_info()
raise bb.build.FuncFailed("Missing parameters: %s" % value)