Commit 64d59162 authored by Jacek Sowiński's avatar Jacek Sowiński

Don't crash on shlex.split in column UI

Also don't try to do anything after such error occurs so we don't
trigger another crash if default_command is assinged to some alias.

Hopefully finaly fixes #107
parent c8eccd69
......@@ -101,6 +101,7 @@ class PromptApplication(CLIApplicationBase):
continue
except ValueError as verr:
error('Error: ' + str(verr))
continue
mtime_after = _todotxt_mtime()
......
......@@ -245,7 +245,12 @@ class UIApplication(CLIApplicationBase):
p_todo_id = ' '.join(self.marked_todos)
p_command = p_command.format(p_todo_id)
p_command = shlex.split(p_command)
try:
p_command = shlex.split(p_command)
except ValueError as verr:
self._print_to_console('Error: ' + str(verr))
return
try:
(subcommand, args) = get_subcommand(p_command)
except ConfigError as cerr:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment