Add case for empty input

This commit is contained in:
Ian Adam Naval 2015-02-26 16:36:02 -05:00
parent 23ae01e442
commit e363bfd13c

View File

@ -62,7 +62,9 @@ class HistoryConsole(code.InteractiveConsole):
If the line begins with ">", we just strip it and evaluate as valid
Python."""
raw_input_line = input(prompt)
if len(raw_input_line) > 0 and raw_input_line[0] == '>':
if raw_input_line == "":
return raw_input_line
if raw_input_line[0] == '>':
return raw_input_line[1:]
else:
cmds = parse_cmds(raw_input_line)