diff --git a/IPython/core/application.py b/IPython/core/application.py index 918211b..c2e5f0c 100644 --- a/IPython/core/application.py +++ b/IPython/core/application.py @@ -215,7 +215,7 @@ class BaseIPythonApplication(Application): return crashhandler.crash_handler_lite(etype, evalue, tb) def _ipython_dir_changed(self, name, old, new): - if old is not None and old is not Undefined: + if old is not Undefined: str_old = py3compat.cast_bytes_py2(os.path.abspath(old), sys.getfilesystemencoding() ) diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index d442173..6638b2f 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -355,7 +355,7 @@ define(["widgets/js/manager", this.pending_msgs++; } } - // Since the comm is a one-way communication, assume the message + // Since the comm is a one-way communication, assume the message // arrived. Don't call success since we don't have a model back from the server // this means we miss out on the 'sync' event. this._buffered_state_diff = {}; @@ -369,7 +369,7 @@ define(["widgets/js/manager", // being the value or the promise of the serialized value var serializers = this.constructor.serializers; if (serializers) { - for (k in attrs) { + for (var k in attrs) { if (serializers[k] && serializers[k].serialize) { attrs[k] = (serializers[k].serialize)(attrs[k], this); } @@ -383,11 +383,13 @@ define(["widgets/js/manager", for (var i=0; i