summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/build.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 3fb025233..2036ca475 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -203,7 +203,10 @@ def exec_func_python(func, d, runfile, cwd=None):
raise FuncFailed(func, None)
finally:
if cwd and olddir:
- os.chdir(olddir)
+ try:
+ os.chdir(olddir)
+ except OSError:
+ pass
def exec_func_shell(function, d, runfile, cwd=None, fakeroot=False):
"""Execute a shell function from the metadata