mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
fix date objects in _reserialize_reply
This commit is contained in:
parent
72721e208d
commit
e0cdb267de
@ -30,6 +30,7 @@ from zmq.utils import jsonapi
|
||||
from IPython.external.decorator import decorator
|
||||
from IPython.zmq.session import Session
|
||||
from IPython.lib.security import passwd_check
|
||||
from IPython.utils.jsonutil import date_default
|
||||
|
||||
try:
|
||||
from docutils.core import publish_string
|
||||
@ -385,13 +386,13 @@ class ZMQStreamHandler(websocket.WebSocketHandler):
|
||||
except KeyError:
|
||||
pass
|
||||
msg.pop('buffers')
|
||||
return jsonapi.dumps(msg)
|
||||
return jsonapi.dumps(msg, default=date_default)
|
||||
|
||||
def _on_zmq_reply(self, msg_list):
|
||||
try:
|
||||
msg = self._reserialize_reply(msg_list)
|
||||
except:
|
||||
self.application.log.critical("Malformed message: %r" % msg_list)
|
||||
except Exception:
|
||||
self.application.log.critical("Malformed message: %r" % msg_list, exc_info=True)
|
||||
else:
|
||||
self.write_message(msg)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user