diff options
author | Richard Purdie <richard@ted.(none)> | 2009-09-22 19:50:22 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-09-24 18:57:08 +0100 |
commit | 81386036806d623dc32fab04adb8ba50b2b0c3e6 (patch) | |
tree | 070e15b3e31734243bedbe68281d39d65965c0c3 /bitbake-dev/lib | |
parent | 1bc5ed054ebddb8202ba1493a628b373a5de457a (diff) | |
download | openembedded-core-81386036806d623dc32fab04adb8ba50b2b0c3e6.tar.gz openembedded-core-81386036806d623dc32fab04adb8ba50b2b0c3e6.tar.bz2 openembedded-core-81386036806d623dc32fab04adb8ba50b2b0c3e6.zip |
bitbake/fetch: Ensure SRCREVINACTION always resets the core flags even when parsing failes by using a try/finally
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev/lib')
-rw-r--r-- | bitbake-dev/lib/bb/fetch/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py index b58177461b..2191c284e3 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) |