Skip to content

Commit 8e3cc4e

Browse files
committed
traitlets api backport
4.x doesn't use traitlets 4.2 API
1 parent 8b77f00 commit 8e3cc4e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

notebook/notebookapp.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
from nbformat.sign import NotebookNotary
8080
from traitlets import (
8181
Dict, Unicode, Integer, List, Bool, Bytes, Instance,
82-
TraitError, Type, Float, observe
82+
TraitError, Type, Float,
8383
)
8484
from ipython_genutils import py3compat
8585
from jupyter_core.paths import jupyter_runtime_dir, jupyter_path
@@ -544,9 +544,8 @@ def _token_default(self):
544544
else:
545545
self._token_generated = True
546546
return binascii.hexlify(os.urandom(24)).decode('ascii')
547-
548-
@observe('token')
549-
def _token_changed(self, change):
547+
548+
def _token_changed(self, name, old, new):
550549
self._token_generated = False
551550

552551
password = Unicode(u'', config=True,

0 commit comments

Comments
 (0)