From 6c483def9de9d404d3ae0ee9d5117d20bde53041 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 28 Oct 2008 00:29:41 +0000 Subject: [PATCH] Allow get_cwd to fail --- terminatorlib/terminatorterm.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index d1561811..fa198cb8 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -493,8 +493,13 @@ text/plain """ Return the current working directory of the subprocess. This function requires OS specific behaviours """ - cwd = self.terminator.pid_get_cwd (self._pid) - dbg ('get_cwd found: %s'%cwd) + try: + cwd = self.terminator.pid_get_cwd (self._pid) + except OSError: + err ('get_cwd: unable to get cwd of %d' % self._pid) + cwd = '~' + pass + err ('get_cwd found: %s'%cwd) return (cwd) def reconfigure_vte (self):