summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index fab16ffc58..6592eb00dd 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -421,12 +421,14 @@ def better_eval(source, locals, extraglobals = None):
421 return eval(source, ctx, locals) 421 return eval(source, ctx, locals)
422 422
423@contextmanager 423@contextmanager
424def fileslocked(files): 424def fileslocked(files, *args, **kwargs):
425 """Context manager for locking and unlocking file locks.""" 425 """Context manager for locking and unlocking file locks."""
426 locks = [] 426 locks = []
427 if files: 427 if files:
428 for lockfile in files: 428 for lockfile in files:
429 locks.append(bb.utils.lockfile(lockfile)) 429 l = bb.utils.lockfile(lockfile, *args, **kwargs)
430 if l is not None:
431 locks.append(l)
430 432
431 try: 433 try:
432 yield 434 yield