]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build: don't choke if olddir no longer exists
authorChris Larson <chris_larson@mentor.com>
Fri, 25 Mar 2011 16:11:34 +0000 (09:11 -0700)
committerChris Larson <chris_larson@mentor.com>
Fri, 25 Mar 2011 16:11:34 +0000 (09:11 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/build.py

index 3fb025233fb836162fe158387ebc65ac18459983..2036ca475bcd813e37a8370a0d326d7ba2f00858 100644 (file)
@@ -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