Only execute python when notebook is trusted

This commit is contained in:
Juergen Hasch
2015-01-24 11:41:07 +01:00
parent 8b03be6351
commit fcc5b92b21
+1 -2
View File
@@ -34,8 +34,7 @@ define([
var execute_python = function(cell,text) {
/* never execute code in untrusted notebooks */
if (IPython.notebook.trusted === false ) {
console.log("Trust check:", IPython.notebook.trusted);
// return text
return text
}
/* always clear stored variables if notebook is dirty */
if (IPython.notebook.dirty === true ) delete cell.metadata.variables;