bluesky.plans.finalize_wrapper

bluesky.plans.finalize_wrapper(plan, final_plan)

try...finally helper

Run the first plan and then the second. If any of the messages raise an error in the RunEngine (or otherwise), the second plan will attempted to be run anyway.

Parameters:
  • plan (iterable or iterator) – a generator, list, or similar containing Msg objects
  • final_plan (iterable or iterator) – a generator, list, or similar containing Msg objects; attempted to be run no matter what happens in the first plan
Yields:

msg (Msg) – messages from plan until it terminates or an error is raised, then messages from final_plan