diff options
-rw-r--r-- | bitbake/lib/bb/utils.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 8d40bcdf83..d65265c461 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -428,10 +428,11 @@ def fileslocked(files): | |||
428 | for lockfile in files: | 428 | for lockfile in files: |
429 | locks.append(bb.utils.lockfile(lockfile)) | 429 | locks.append(bb.utils.lockfile(lockfile)) |
430 | 430 | ||
431 | yield | 431 | try: |
432 | 432 | yield | |
433 | for lock in locks: | 433 | finally: |
434 | bb.utils.unlockfile(lock) | 434 | for lock in locks: |
435 | bb.utils.unlockfile(lock) | ||
435 | 436 | ||
436 | @contextmanager | 437 | @contextmanager |
437 | def timeout(seconds): | 438 | def timeout(seconds): |