Ensure that registered hooks are applied after call to open()

This commit is contained in:
Alex Goodman 2016-10-04 17:46:30 -07:00
parent 1331fe1bd3
commit 044a99ddd7

View file

@ -431,6 +431,14 @@ public class RemoteInterpreterServer
try {
InterpreterContext.set(context);
// Open the interpreter instance prior to calling interpret().
// This is necessary because the earliest we can register a hook
// is from within the open() method.
LazyOpenInterpreter lazy = (LazyOpenInterpreter) interpreter;
if (!lazy.isOpen()) {
lazy.open();
}
// Add hooks to script from registry.
// Global scope first, followed by notebook scope
processInterpreterHooks(null);