Commit 9f0d658a authored by Jacek Sowiński's avatar Jacek Sowiński

Fix unicode input in prompt mode in python2

shlex.split() in python2 doesn't work very well with Unicode as
proven already in #66, so we're using ushlex when running on python2.
parent a7fdcdfd
...@@ -24,9 +24,13 @@ from topydo.cli.CLIApplicationBase import CLIApplicationBase, error, usage ...@@ -24,9 +24,13 @@ from topydo.cli.CLIApplicationBase import CLIApplicationBase, error, usage
from topydo.cli.TopydoCompleter import TopydoCompleter from topydo.cli.TopydoCompleter import TopydoCompleter
from prompt_toolkit.shortcuts import prompt from prompt_toolkit.shortcuts import prompt
from prompt_toolkit.history import InMemoryHistory from prompt_toolkit.history import InMemoryHistory
from six import PY2
from topydo.lib.Config import config, ConfigError from topydo.lib.Config import config, ConfigError
if PY2:
import ushlex as shlex
# First thing is to poke the configuration and check whether it's sane # First thing is to poke the configuration and check whether it's sane
# The modules below may already read in configuration upon import, so # The modules below may already read in configuration upon import, so
# make sure to bail out if the configuration is invalid. # make sure to bail out if the configuration is invalid.
......
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