explicitely pass language for old notebook

This commit is contained in:
Matthias Bussonnier 2015-02-11 11:51:13 -08:00
parent 62bfd92374
commit 2394be85c2
2 changed files with 6 additions and 4 deletions

View File

@ -169,8 +169,7 @@ define([
var that = this;
if (typeof selected === 'string') {
selected = {
name: selected,
language: selected
name: selected
};
}
if (this._loaded) {

View File

@ -2219,10 +2219,13 @@ define(function (require) {
} else if (this.metadata.language) {
// compat with IJulia, IHaskell, and other early kernels
// adopters that where seting a language metadata.
this.kernel_selector.set_kernel(this.metadata.language);
this.kernel_selector.set_kernel({
name: "(No name)",
language: this.metadata.language
});
// this shoudl be stored in kspec now, delete it.
// remove once we do not support notebook v3 anymore.
del this.metadata.language;
delete this.metadata.language;
} else {
// setting kernel via set_kernel above triggers start_session,
// otherwise start a new session with the server's default kernel