Skip to content

Commit 8d9b73f

Browse files
committed
use documented hmac.new API
rather than class constructor, which is not compatible with both Python 2 and 3
1 parent e80ed0d commit 8d9b73f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/notebookapp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def _default_cookie_secret(self):
706706
else:
707707
key = encodebytes(os.urandom(32))
708708
self._write_cookie_secret_file(key)
709-
h = hmac.HMAC(key, digestmod='sha256')
709+
h = hmac.new(key, digestmod='sha256')
710710
h.update(self.password.encode())
711711
return h.digest()
712712

0 commit comments

Comments
 (0)