From 81386036806d623dc32fab04adb8ba50b2b0c3e6 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 22 Sep 2009 19:50:22 +0100 Subject: bitbake/fetch: Ensure SRCREVINACTION always resets the core flags even when parsing failes by using a try/finally Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index d7b9463b4e..a7fc1af0c9 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) -- cgit v1.2.3-54-g00ecf