summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitbake-dev/lib/bb/fetch/__init__.py8
-rw-r--r--bitbake/lib/bb/fetch/__init__.py8
2 files changed, 10 insertions, 6 deletions
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py
index b58177461..2191c284e 100644
--- a/bitbake-dev/lib/bb/fetch/__init__.py
+++ b/bitbake-dev/lib/bb/fetch/__init__.py
@@ -351,9 +351,11 @@ class FetchData(object):
# if user sets localpath for file, use it instead.
self.localpath = self.parm["localpath"]
else:
- bb.fetch.srcrev_internal_call = True
- self.localpath = self.method.localpath(self.url, self, d)
- bb.fetch.srcrev_internal_call = False
+ try:
+ bb.fetch.srcrev_internal_call = True
+ self.localpath = self.method.localpath(self.url, self, d)
+ finally:
+ bb.fetch.srcrev_internal_call = False
# We have to clear data's internal caches since the cached value of SRCREV is now wrong.
# Horrible...
bb.data.delVar("ISHOULDNEVEREXIST", d)
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index d7b9463b4..a7fc1af0c 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -357,9 +357,11 @@ class FetchData(object):
# if user sets localpath for file, use it instead.
self.localpath = self.parm["localpath"]
else:
- bb.fetch.srcrev_internal_call = True
- self.localpath = self.method.localpath(self.url, self, d)
- bb.fetch.srcrev_internal_call = False
+ try:
+ bb.fetch.srcrev_internal_call = True
+ self.localpath = self.method.localpath(self.url, self, d)
+ finally:
+ bb.fetch.srcrev_internal_call = False
# We have to clear data's internal caches since the cached value of SRCREV is now wrong.
# Horrible...
bb.data.delVar("ISHOULDNEVEREXIST", d)