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 4c304754b..c8928deb1 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -187,7 +187,10 @@ def exec_func_shell(func, d):
else:
maybe_fakeroot = ''
ret = os.system('%ssh -e %s' % (maybe_fakeroot, runfile))
- os.chdir(prevdir)
+ try:
+ os.chdir(prevdir)
+ except:
+ pass
# restore the backups
os.dup2(osi[0], osi[1])