mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Python: skip interpreting empty paragraphs
This commit is contained in:
parent
a7248cdc94
commit
bc91b86f94
1 changed files with 3 additions and 1 deletions
|
|
@ -134,7 +134,9 @@ public class PythonInterpreter extends Interpreter {
|
|||
@Override
|
||||
public InterpreterResult interpret(String cmd, InterpreterContext contextInterpreter) {
|
||||
this.context = contextInterpreter;
|
||||
|
||||
if (cmd == null || cmd.isEmpty()) {
|
||||
return new InterpreterResult(Code.SUCCESS, "");
|
||||
}
|
||||
String output = sendCommandToPython(cmd);
|
||||
return new InterpreterResult(Code.SUCCESS, output.replaceAll(">>>", "")
|
||||
.replaceAll("\\.\\.\\.", "").trim());
|
||||
|
|
|
|||
Loading…
Reference in a new issue