diff --git a/terminatorlib/config.py b/terminatorlib/config.py index fca199cd..1ba9fc64 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -411,8 +411,6 @@ class ConfigBase(Borg): self.layouts = {} for layout in DEFAULTS['layouts']: self.layouts[layout] = copy(DEFAULTS['layouts'][layout]) - if self.command_line_options is None: - self.command_line_options = {} def defaults_to_configspec(self): """Convert our tree of default values into a ConfigObj validation diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 786b0264..3cb1236e 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1050,10 +1050,10 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) self.vte.grab_focus() options = self.config.options_get() - if options.command: + if options and options.command: command = options.command options.command = None - elif options.execute: + elif options and options.execute: command = options.execute options.execute = None elif self.config['use_custom_command']: @@ -1220,8 +1220,9 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) dbg(layout) if layout.has_key('command') and layout['command'] != '': options = self.config.options_get() - options.command = layout['command'] - self.config.options_set(options) + if options: + options.command = layout['command'] + self.config.options_set(options) # There now begins a great list of keyboard event handlers def key_zoom_in(self):