From 867ef4d399615fe2550dcf0db0094b4f9ab933be 2014-11-18 13:33:00 From: Matthias Bussonnier Date: 2014-11-18 13:33:00 Subject: [PATCH] Merge pull request #6959 from minrk/check-kernel-execute don't execute if kernel is not connected --- diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index 8ae55b5..ae0afda 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -278,6 +278,11 @@ define([ * @method execute */ CodeCell.prototype.execute = function () { + if (!this.kernel || !this.kernel.is_connected()) { + console.log("Can't execute, kernel is not connected."); + return; + } + this.output_area.clear_output(); // Clear widget area