From ceec896718e74bbc3913637dd04dacdfac0f0410 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 19 Dec 2020 14:17:50 +0100 Subject: [PATCH] Improved error handling --- src/sh_edraft/cli/interpreter/interpreter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sh_edraft/cli/interpreter/interpreter.py b/src/sh_edraft/cli/interpreter/interpreter.py index e1cf07ea..d3e580e4 100644 --- a/src/sh_edraft/cli/interpreter/interpreter.py +++ b/src/sh_edraft/cli/interpreter/interpreter.py @@ -16,6 +16,11 @@ class Interpreter: def interpret(self, input_string: str): input_list = input_string.split(' ') command = input_list[0] + if command is None or command == '': + Console.error(f'Expected command') + Console.error('Run \'cpl help\'') + return + args = input_list[1:] if len(input_list) > 1 else [] cmd = next(