Permalink
Browse files

Check for null rather than undefined

set kernel id to None/null if not started
  • Loading branch information...
Carreau committed May 3, 2012
1 parent 7244b9c commit a809dd960965df1c5c1f5cabb3bc5d99a41b2d48
@@ -593,10 +593,7 @@ def get(self):
km = self.application.kernel_manager
files = nbm.list_notebooks()
for f in files :
- nid = f['notebook_id']
- kid = km.kernel_for_notebook(nid)
- if kid is not None:
- f['kernel_id'] = kid
+ f['kernel_id'] = km.kernel_for_notebook(f['notebook_id'])
self.finish(jsonapi.dumps(files))
@web.authenticated
@@ -113,7 +113,7 @@ var IPython = (function (IPython) {
this.add_link(notebook_id, nbname, item);
if (!IPython.read_only){
// hide delete buttons when readonly
- if(kernel == undefined){
+ if(kernel == null){
this.add_delete_button(item);
} else {
this.add_shutdown_button(item,kernel);

0 comments on commit a809dd9

Please sign in to comment.