2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-12 10:49:17 +00:00

Be more friendly about shlex parsing errors

If user provides bad input, be more helpful and
less fatalistic.
This commit is contained in:
Jarrod Johnson 2017-03-01 10:31:00 -05:00
parent 011ba66314
commit 43b51eec20

View File

@ -235,7 +235,11 @@ def rcompleter(text, state):
def parse_command(command):
args = shlex.split(command, posix=True)
try:
args = shlex.split(command, posix=True)
except ValueError as ve:
print('Error: ' + ve.message)
return []
return args