[jhbuild] terminal: do not fail on removed current working directory (#662392)



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]