diff options
-rw-r--r-- | bitbake/lib/bb/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index d11da978d7..298017657a 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -429,12 +429,14 @@ def better_eval(source, locals, extraglobals = None): | |||
429 | return eval(source, ctx, locals) | 429 | return eval(source, ctx, locals) |
430 | 430 | ||
431 | @contextmanager | 431 | @contextmanager |
432 | def fileslocked(files): | 432 | def fileslocked(files, *args, **kwargs): |
433 | """Context manager for locking and unlocking file locks.""" | 433 | """Context manager for locking and unlocking file locks.""" |
434 | locks = [] | 434 | locks = [] |
435 | if files: | 435 | if files: |
436 | for lockfile in files: | 436 | for lockfile in files: |
437 | locks.append(bb.utils.lockfile(lockfile)) | 437 | l = bb.utils.lockfile(lockfile, *args, **kwargs) |
438 | if l is not None: | ||
439 | locks.append(l) | ||
438 | 440 | ||
439 | try: | 441 | try: |
440 | yield | 442 | yield |