From 14e4b4d3fe1dce13ab346da60bd71ab1a9018700 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 31 Mar 2010 14:02:55 +0100 Subject: [PATCH] Fix --working-directory. Closes LP #552497 --- terminatorlib/optionparse.py | 2 +- terminatorlib/terminal.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/terminatorlib/optionparse.py b/terminatorlib/optionparse.py index 19c759a3..09a67eab 100755 --- a/terminatorlib/optionparse.py +++ b/terminatorlib/optionparse.py @@ -108,7 +108,7 @@ WM_WINDOW_ROLE property on the window') else: err('OptionParse::parse_options: %s does not exist' % options.working_directory) - sys.exit(1) + options.working_directory = '' if options.layout is None: options.layout = 'default' diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 97da9b35..abac61bf 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1061,6 +1061,11 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) details[1])) command = 'telnet %s %s' % (details[0], details[1]) + if options and options.working_directory and \ + options.working_directory != '': + self.set_cwd(options.working_directory) + options.working_directory = '' + if type(command) is list: shell = util.path_lookup(command[0]) args = command