diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/build.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 2ed0441b49..249f7d6bb4 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -261,9 +261,14 @@ def exec_func(func, d, dirs = None, pythonexception=False): else: exec_func_shell(func, d, runfile, cwd=adir) - if oldcwd and os.getcwd() != oldcwd: + try: + curcwd = os.getcwd() + except: + curcwd = None + + if oldcwd and curcwd != oldcwd: try: - bb.warn("Task %s changed cwd to %s" % (func, os.getcwd())) + bb.warn("Task %s changed cwd to %s" % (func, curcwd)) os.chdir(oldcwd) except: pass |