[jhbuild] terminal: do not fail on removed current working directory (#662392)
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] terminal: do not fail on removed current working directory (#662392)
- Date: Fri, 21 Oct 2011 15:11:48 +0000 (UTC)
commit 7f736320781d6f2b512114c8007d08da8def93aa
Author: FrÃdÃric PÃters <fpeters 0d be>
Date: Fri Oct 21 17:11:19 2011 +0200
terminal: do not fail on removed current working directory (#662392)
jhbuild/frontends/terminal.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/frontends/terminal.py b/jhbuild/frontends/terminal.py
index 1650984..5f8e3ed 100644
--- a/jhbuild/frontends/terminal.py
+++ b/jhbuild/frontends/terminal.py
@@ -147,11 +147,14 @@ class TerminalBuildScript(buildscript.BuildScript):
kws = {
'close_fds': True
}
- print_args = {}
+ print_args = {'cwd': ''}
if cwd:
print_args['cwd'] = cwd
else:
- print_args['cwd'] = os.getcwd()
+ try:
+ print_args['cwd'] = os.getcwd()
+ except OSError:
+ pass
if isinstance(command, (str, unicode)):
kws['shell'] = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]