summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index d11da978d..298017657 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -429,12 +429,14 @@ def better_eval(source, locals, extraglobals = None):
return eval(source, ctx, locals)
@contextmanager
-def fileslocked(files):
+def fileslocked(files, *args, **kwargs):
"""Context manager for locking and unlocking file locks."""
locks = []
if files:
for lockfile in files:
- locks.append(bb.utils.lockfile(lockfile))
+ l = bb.utils.lockfile(lockfile, *args, **kwargs)
+ if l is not None:
+ locks.append(l)
try:
yield