Permalink
Browse files

fix date objects in _reserialize_reply

  • Loading branch information...
1 parent 04351cd commit 4cb7712d3702b77125506376e5f40fbc8058fd48 @minrk committed May 22, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 IPython/frontend/html/notebook/handlers.py
@@ -30,6 +30,7 @@
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 @@ def _reserialize_reply(self, msg_list):
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)

0 comments on commit 4cb7712

Please sign in to comment.