From 23ae01e4423e5122a27ac47484221c5cbe4e1144 Mon Sep 17 00:00:00 2001 From: Ian Adam Naval Date: Thu, 26 Feb 2015 16:34:35 -0500 Subject: [PATCH] Fix issue where empty inputs cause crash --- console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.py b/console.py index 5b20bc1..2c73268 100644 --- a/console.py +++ b/console.py @@ -62,7 +62,7 @@ class HistoryConsole(code.InteractiveConsole): If the line begins with ">", we just strip it and evaluate as valid Python.""" raw_input_line = input(prompt) - if raw_input_line[0] == '>': + if len(raw_input_line) > 0 and raw_input_line[0] == '>': return raw_input_line[1:] else: cmds = parse_cmds(raw_input_line)