minor post-execute fixes (#1154) #1155

Merged
merged 3 commits into from Dec 15, 2011

2 participants

@minrk
IPython member

Two changes:

  1. Don't unregister failing post-exec callbacks automatically. Instead, print a message regarding the failure, pointing to new disable_failing_post_execute trait for skipping failing callbacks.
    • When this flag is False (the default), failing callbacks will continue to be called.
    • When True, behavior is unchanged from previous, where callbacks are only allowed to fail once.
  2. protect flush_figures() post-exec function from user error. Invalid matplotlib data may raise inside print_figure(). flush_figures() is a post-exec function, so user errors should not raise. Instead, call get_ipython().showtraceback() if called from IPython, raising as before otherwise.

closes #1154

minrk added some commits Dec 14, 2011
@minrk minrk Don't unregister failing post-exec callbacks automatically
Instead, print a message regarding the failure, pointing to new
`disable_failing_post_execute` trait for skipping failing callbacks.

When this flag is False (the default), failing callbacks will continue to be called.
When True, behavior is unchanged from previous, where callbacks are only allowed to fail once.
f972ef8
@minrk minrk protect flush_figures post-exec function from user error
Invalid matplotlib data may raise inside print_figure.  flush_figures()
is a post-exec function, so user errors should not raise.  Instead,
call get_ipython().showtraceback() if called from IPython, raising as before
otherwise.
c98183c
@fperez
IPython member

Reviewed together at Berkeley, @minrk is making one tiny fix and then we'll merge.

@fperez fperez merged commit 2c683b7 into ipython:master Dec 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment