mabl / PyPylon

An experimental python wrapper around the Basler Pylon 5 library
BSD 3-Clause "New" or "Revised" License
53 stars 34 forks source link

Fix/issue 21 #22

Open RichardLangFromNZ opened 8 years ago

RichardLangFromNZ commented 8 years ago

Fix for issue https://github.com/mabl/PyPylon/issues/21

Wrap image grabbing from underlying c++ object in exception handler and on any exception being caught stop grabbing before re-throwing. Relieves client code of burden of explicitly having to call stop_grabbing() on exception.

Built on top of as yet un-merged PR https://github.com/mabl/PyPylon/pull/17