The current implementation of fast_forward is unsafe if the code in the context manager raises an exception.
This code will restore the former interval only if the code inside the context manager doesn't raise an error.
If it the case, it will never restore the update interval and the model will be left "broken".
It would be better to do something like
The current implementation of
fast_forward
is unsafe if the code in the context manager raises an exception.This code will restore the former interval only if the code inside the context manager doesn't raise an error. If it the case, it will never restore the update interval and the model will be left "broken". It would be better to do something like
so that whatever happens, the configuration is restored in the end. I can submit a PR with implementation and tests if you want.