From 3048c01175e93e0eaf45b16ffb0643d72b1ea0a3 2011-08-27 06:18:48
From: MinRK <benjaminrk@gmail.com>
Date: 2011-08-27 06:18:48
Subject: [PATCH] fix undefined 'session_id' member in kernel.js

---

diff --git a/IPython/frontend/html/notebook/static/js/kernel.js b/IPython/frontend/html/notebook/static/js/kernel.js
index 708b933..ef7ea0c 100644
--- a/IPython/frontend/html/notebook/static/js/kernel.js
+++ b/IPython/frontend/html/notebook/static/js/kernel.js
@@ -20,6 +20,10 @@ var IPython = (function (IPython) {
         this.shell_channel = null;
         this.iopub_channel = null;
         this.running = false;
+        
+        this.username = "username";
+        this.session_id = utils.uuid();
+        
         if (typeof(WebSocket) !== 'undefined') {
             this.WebSocket = WebSocket
         } else if (typeof(MozWebSocket) !== 'undefined') {
@@ -34,8 +38,8 @@ var IPython = (function (IPython) {
         var msg = {
             header : {
                 msg_id : utils.uuid(),
-                username : "username",
-                session: this.session_id,
+                username : this.username,
+                session : this.session_id,
                 msg_type : msg_type
             },
             content : content,